jQuery History Plugin BBS

jQuery History Plugin BBS

<a href="http://www.arkcalledearth.org/">order cialis online</a> [url="http://www.arkcalledearth.org/"]order cialis online[/url] http://www.arkcalledearth.org/ order cialis online  kpj

1 IE7 and IE8 Add a "/" after hash 45 2 Safari 4.04 Bug - Double back button on POST pages 171 3 Google Chrome on linux 6 4 Opera 10.10 - Double click on back/forward button 1 5 Updated Plugin Code Format 5 6 #aao still doesn't work? 4 7 &var=value stripped 6 8 IE6 and HTTPS site 8 9 Firefox ampersand in hash 6 10 double pageloading in FF 2 11 Safari 4.0.4 problems 1 12 gotta press the "Go Back" button twice to change the address as if links are in a iframe 4 13 test 2 14 browser versions 3 15 pageload not firing without hash 0 16 use of jquery plugin in grails (grails.org) 0 17 bbs setup 0


EDIT FEED LATEX FOCUS RESP

IE7 and IE8 Add a "/" after hash

plugin
45
Travis
2009/10/28 03:26
2010/03/10 17:23

So, the deeplinking functionality is working great.

Not loading any ajax, just executing the appropriate js to show and hide content, depending on the hash.

I have no functionality issues, except that in IE7 and IE8, where the address SHOULD read:

http://xxxxxxx/xxxxx/#category-name

What IE7 and IE8 are adding is an additional "/" after the hash, like so:

http://xxxxxxx/xxxxx/#/category-name

What's crazy, is that at first it's right, but then you can actually see the forward slash added afterwards.

The only reason this is a problem, is if someone cuts this url, pastes it into an e-mail, and sends it to someone who clicks and opens it in Firefox or Safari.

Does that make sense? What am I missing?

......
Best high risk personal loans QmqLODxUBr 2010/03/10 11:19
discount cigarettes price oeXvwYdD 2010/03/10 11:43
Real no credit check loans TrhydKcOojSHuEDliEy 2010/03/10 12:07
cheap cigarettes online xqrCAnGtJbfOKqGrvdA 2010/03/10 12:31
student loan forgiveness information ZHGUxJXdTYh 2010/03/10 12:55
All about buy phentermine without prescription online no hasle xXoDWNWEMlwAarsBXp 2010/03/10 13:19
short skirt gallery TDqFvEihqfMJkaD 2010/03/10 13:44
Discount how long does xanax stay in your blood cpToVraPjmbC 2010/03/10 14:08
coach purses price HnNnEzSWRvAfzzv 2010/03/10 14:33
Buy how long does cialis last HvTbgLRszMOJu 2010/03/10 14:57
debt settlement discount QjIoZxUkBM 2010/03/10 15:21
how long does tramadol stay in your system now eGNSxXssPymY 2010/03/10 15:46
pay capital one credit card bill cGpELbpNBeTUCZSd 2010/03/10 16:10
Discount buy diflucan without no prescription veterinary qhueZZztKbOHqVWkcMj 2010/03/10 16:34
free musical ecards qiPOeNTHcJUtMNYh 2010/03/10 16:59
All about darvocet without a prescription IpuNmDCJCQLfv 2010/03/10 17:23

EDIT FEED LATEX FOCUS RESP

Safari 4.04 Bug - Double back button on POST pages

plugin
171
David Dressler
2010/01/27 00:20
2010/03/10 08:12

There appears to be a bug when you post to a page and use the jquery.history.js plugin on that page to keep track of the browser's history. The browser history works fine in IE8,IE6, FF 3.5, but not Safari. In Safari you would press the back button 1 time and you would lose the forward history (forward button would become grayed out) and the url in the address bar would change, but the historyCheck would fail to recognize the back. On the second time you pressed the back button the url in the address bar would stay the same, and the historyCheck would recognize that the back button had been pressed. Also the forward button would turn active. If you pressed the forward button nothing would change and the forward button would become deactivated.

Anyone else having this problem and know how to fix it? I might just change the form method to GET instead of POST.

......
britney spears sex tape free qyEcogjkQEs 2010/03/09 22:07
Buy kim kardashian sex tape cVvwqnRtsIROEvC 2010/03/09 22:47
Only miss california sex tape QQmhqYxENwf 2010/03/09 23:27
Cheap lindsay lohan sex tape BdjtgnkunTD 2010/03/10 00:07
kristin davis sex tape information clzFmwjLZkwtgyd 2010/03/10 00:47
granny sex information PEgJUDxkHKl 2010/03/10 01:27
no credit check student loan IEwEdPKUONLIi 2010/03/10 02:07
All about mortgage rates predictions nivNEfxGVtLXq 2010/03/10 02:47
airline discount ticket military nYAsPOUaZPlLCEhfO 2010/03/10 03:28
cheap cigarettes dZpKPShrZYAHrcuij 2010/03/10 04:09
replica coach purses WUBccWyWyp 2010/03/10 04:50
All about insurance sample cancellation letter kNGnVcqjEvg 2010/03/10 05:31
All about watch my wife KVnhwfujIMgFs 2010/03/10 06:11
car insurance for teenagers discount yoGzgPvuqbXEy 2010/03/10 06:51
darvocet zWKchrIrIWvTQenTa 2010/03/10 07:32
Best diflucan aetMsbfRvlXnCpeOwY 2010/03/10 08:12

EDIT FEED LATEX FOCUS RESP

Google Chrome on linux

plugin
6
nitro
2010/02/13 04:05
2010/03/07 14:26

Hi!

Seems like its not working anymore in Google Chrome for Linux (5.0.307.5). It was working before (like a month ago), but not working anymore. Gmail history manager and YUI (http://developer.yahoo.com/yui/history/) history manager are still working. Your demo page is not working, so you won't need anything to setup in order to repeat the bug.

Thanks!

dave Try changing browser.safari on all occurences to browser.webkit, it seems to work here. 2010/02/17 18:37
dave btw. Using jquery-1.3.2 - the newer 1.4.1 didn't seem to work out of the box. 2010/02/17 18:41
nitro It's working if a replace browser.safari by browser.webkit. Will you fix it in the next version? 2010/02/22 01:27
jalob replacing by browser.webkit didn't help in Chrome 5.0.322.2 for Linux 2010/02/26 22:58
Pockata Jquery's mistaking chrome as safari. Just replace $.browser.safari with $.browser.webkit && /chrome/.test( navigator.userAgent.toLowerCase() ) != true :) 2010/03/03 08:37
celmdcldn poKRtpde 2010/03/07 14:26

EDIT FEED LATEX FOCUS RESP

Opera 10.10 - Double click on back/forward button

plugin
1
jalob
2010/02/26 23:14
2010/03/07 08:05

Hello,

in Opera 10 I need to click twice on the back/forward button: it happens nothing after the first click and only the second click loads the content from the history. Does anybody have the same problem? Any idea to fix it?

Thanks!

jthulng ScjlMcgRCcSXVvsEli 2010/03/07 08:05

EDIT FEED LATEX FOCUS RESP

Updated Plugin Code Format

plugin
5
Kevin Dalman
2009/12/28 04:46
2010/03/07 07:54

Updated Plugin Code Format

I am going to try your plugin for an app I'm working on, but I did not like that it added so many things to the jQuery root namespace. The long, prefixed vars also made the code harder to read. So I reformatted the plugin to use a $.history namespace, and to use the recommended wrapper so it can use $ for jQuery internally. I'm passing this on.

There are no functional enhancements in these changes. But this is a syntax change, so existing code-calls would have to be changed, eg: $.historyInit() to $.history.init() This is actually a more standard format, so is very minor.

The code below uses my personal preference for the 'this' alias - an underscore (var _ = $.history). I find this makes component code very easy to read, but if you prefer the more common 'self' alias, just search & replace to change it:

  • var _ = $.history ==> self = $.history
  • _. ==> self.

Complete Code

(function ($) {

$.history = {
    currentHash:   ''
,   length:        0
,   lastLength:    0
,   backStack:     []
,   forwardStack:  []
,   isFirst:       true
,   skipCheck:     false        // true = temporarily skip history checks
,   callback:      undefined    // required parameter
,   needIframe:    $.browser.msie && ($.browser.version < 8 || document.documentMode < 8)

,   init: function (callback) {
        var _ = $.history;
        var cur_hash = location.hash.replace(/\?.*$/, '');
        _.currentHash = cur_hash;
        _.callback = callback;

        if (_.needIframe) {
            // To stop the callback firing twice during initilization if no hash present
            if (_.currentHash == '') {
                _.currentHash = '#';
            }
            // add hidden iframe for IE
            $("body").prepend('<iframe id="jQuery_history" style="display: none;" src="javascript:false;"></iframe>');
            var ihistory = $("#jQuery_history")[0];
            var iframe = ihistory.contentWindow.document;
            iframe.open();
            iframe.close();
            iframe.location.hash = cur_hash;
        }
        else if ($.browser.safari) {
            _.backStack.length = history.length;
            _.lastLength = history.length;
        }
        if (cur_hash)
            _.callback(cur_hash.replace(/^#/, ''));

        setInterval(jQuery.history.check, 100);
    }

,   add: function (hash) {
        var _ = $.history;
        // This makes the looping function do something
        _.backStack.push(hash);
        _.forwardStack.length = 0; // clear forwardStack (true click occured)
        _.isFirst = true;
    }

,   check: function () {
        var _ = $.history;
        if (_.needIframe) {
            // On IE, check for location.hash of iframe
            var ihistory = $("#jQuery_history")[0];
            var iframe = ihistory.contentDocument || ihistory.contentWindow.document;
            var cur_hash = iframe.location.hash.replace(/\?.*$/, '');
            if (cur_hash != _.currentHash) {
                location.hash = cur_hash;
                _.currentHash = cur_hash;
                _.callback(cur_hash.replace(/^#/, ''));
            }
        }
        else if ($.browser.safari) {
            if (_.lastLength == history.length && _.backStack.length > _.lastLength) {
                _.backStack.shift();
            }
            if (!_.skipCheck) {
                var historyDelta = history.length - _.backStack.length;
                _.lastLength = history.length;

                if (historyDelta != 0) { // back or forward button has been pushed
                    _.isFirst = false;
                    if (historyDelta < 0) { // back button has been pushed
                        // move items to forward stack
                        for (var i = 0; i < Math.abs(historyDelta); i++)
                            _.forwardStack.unshift(_.backStack.pop());
                    }
                    else { // forward button has been pushed
                        // move items to back stack
                        for (var i = 0; i < historyDelta; i++)
                            _.backStack.push(_.forwardStack.shift());
                    }
                    var cachedHash = _.backStack[_.backStack.length - 1];
                    if (cachedHash != undefined) {
                        _.currentHash = location.hash.replace(/\?.*$/, '');
                        _.callback(cachedHash);
                    }
                }
                else if (_.backStack[_.backStack.length - 1] == undefined && !_.isFirst) {
                    // back button has been pushed to beginning and URL already pointed to hash (e.g. a bookmark)
                    // document.URL doesn't change in Safari
                    _.callback(location.hash ? location.hash.replace(/^#/, '') : '');
                    _.isFirst = true;
                }
            }
        }
        else {
            // otherwise, check for location.hash
            var cur_hash = location.hash.replace(/\?.*$/, '');
            if (cur_hash != _.currentHash) {
                _.currentHash = cur_hash;
                _.callback(cur_hash.replace(/^#/, ''));
            }
        }
    }

,   load: function (hash) {
        hash = decodeURIComponent(hash.replace(/\?.*$/, ''));

        var _ = $.history;
        var new_hash;

        if ($.browser.safari) {
            new_hash = hash;
        }
        else {
            new_hash = '#'+ hash;
            location.hash = new_hash;
        }
        _.currentHash = new_hash;

        if (_.needIframe) {
            var iframe = $("#jQuery_history")[0].contentWindow.document;
            iframe.open();
            iframe.close();
            iframe.location.hash = new_hash;
            _.lastLength = history.length;
            _.callback(hash);
        }
        else if ($.browser.safari) {
            _.skipCheck = true;
            // Manually keep track of the history values for Safari
            _.add(hash);

            // Wait a while before allowing checking so that Safari has time to update the "history" object
            // correctly (otherwise the check loop would detect a false change in hash).
            window.setTimeout(function(){jQuery.history.skipCheck = false;}, 200);
            _.callback(hash);
            // N.B. "location.hash=" must be the last line of code for Safari as execution stops afterwards.
            // By explicitly using the "location.hash" command (instead of using a variable set to "location.hash") the
            // URL in the browser and the "history" object are both updated correctly.
            location.hash = new_hash;
        }
        else {
          _.callback(hash);
        }
    }

};
})( jQuery );
Johan Steenkamp Nice work Kevin. Many Thanks. 2010/01/05 05:52
bmigmyghv MoPoKvEMluAYMS 2010/01/15 09:50
kulmysz EvsHwswFcSldsAaz 2010/02/04 17:51
jciqicnt PEQJNILVtdT 2010/02/24 05:10
apotmudlz QSIsiCDKBzsJbzmaCLu 2010/03/07 07:54

EDIT FEED LATEX FOCUS RESP

#aao still doesn't work?

plugin
4
user
2009/10/17 19:03
2010/03/05 13:31

hi,

first thanks for a really cool and helpfull plugin

you wrote that it works with all browsers but for me

even in firefox and ie your main example with #aao doesn't work

used de ie8 example for now because it works everywhere,

just was wondering if it is something with my browser

ciao

ijvyrpodzfo aWInFVMeYum 2010/01/12 08:56
ifkxykysqml bXjwH 2010/01/31 16:15
okzbkfs lvOGNQoIzTWvdiS 2010/02/22 08:10
xtiopp pigWlrWMQnNBGgk 2010/03/05 13:31

EDIT FEED LATEX FOCUS RESP

&var=value stripped

plugin
6
rdawg
2009/10/21 23:14
2010/02/07 08:20

Hello, I have a div that I load remote data into. The URL looks something like this: http://blah?&VAR1=value1&VAR2=value2&VARN=valuen. However, by the time the hash is returned to the pageload function, everything after the ? mark is gone. How do I have it keep the '&' in the URL?

Thanks

yrbduexc hskqwMggAOJIxmWo 2009/11/17 13:10
hmwzieqeei 6OAFJD 2009/12/10 04:23
faogjvteyna Fg4lW2 2010/01/04 00:24
fmgbhtaju sfWYSujyUiEQaUgLM 2010/01/15 09:34
ben Yeah - im also looking for an answer to this - anyone? 2010/01/27 10:58
caijvhrk ZjnELZKZiMl 2010/02/07 08:20

EDIT FEED LATEX FOCUS RESP

IE6 and HTTPS site

plugin
8
Øyvind Smestad
2009/10/13 17:06
2010/02/05 21:18

Hi,

When using this on a secure site, I get the "This page contains both secure and nonsecure items" warning. To avoid this I set the src of the iframe to "javascript :false;" initially, as far as I can see everything seems to work OK now :-)

Changes:

// add hidden iframe for IE, ØS: changed to always set src to "javascript:false;" (to fix HTTPS sites in IE6)

jQuery("body").prepend('<iframe id="jQuery_history" style="display: none;" src="javascript:false;"></iframe>');

Cheers

Øyvind

mikage Thank you. I renewed the plug-in. 2009/10/14 00:25
dlwexbas lTMxreTGrxSfZLBXmk 2009/11/12 22:14
somaonlineorder12 OehecQzPiSmpwjSUsB 2009/12/08 02:38
wkblsl DdQxLfyQocmiNnPh 2009/12/31 13:57
guaranteed online personal loans pHHlUtfOaEVIO 2010/01/26 06:24
ray j sex tape RlZjNgHIORRsRCtAqrm 2010/02/01 18:45
knhjoyyff FjvlUvhffW 2010/02/04 18:13
Buy ray j sex tape MOxPPioPpvjMm 2010/02/05 21:18

Wed, 10 Mar 2010 17:41:43 +0900
Powered by RBBS 1.0.18.