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 Safari 4.04 Bug - Double back button on POST pages 179 2 IE7 and IE8 Add a "/" after hash 116 3 #aao still doesn't work? 5 4 Google Chrome on linux 6 5 Opera 10.10 - Double click on back/forward button 1 6 Updated Plugin Code Format 5 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

Safari 4.04 Bug - Double back button on POST pages

plugin
179
David Dressler
2010/01/27 00:20
2010/03/14 17:00

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.

......
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
Only ray j sex tape aNepCajiofVCzbHI 2010/03/14 12:13
carmen electra sex tape kJjAqUUulKxhiBzsJhc 2010/03/14 12:54
jessica simpson sex tape pGQrvFuxg 2010/03/14 13:35
ray j sex tape DxDyrlCFidntK 2010/03/14 14:16
Buy paris hilton sex tape eXeOHhXfuf 2010/03/14 14:57
carrie prejean sex tape discount uSrxTaJFvkFMFRcZ 2010/03/14 15:38
celebrity sex tapes kQJRJgAVbQNiwLsx 2010/03/14 16:19
carmen electra sex tape here SFgeBefpuP 2010/03/14 17:00

EDIT FEED LATEX FOCUS RESP

IE7 and IE8 Add a "/" after hash

plugin
116
Travis
2009/10/28 03:26
2010/03/14 16:38

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?

......
Only r kelly sex tape OpijSBHdZ 2010/03/14 08:31
carrie prejean sex tape discount ADjdqcfyzbFfrtUlXV 2010/03/14 08:56
Best keeley hazell sex tape jUozuqkUPI 2010/03/14 09:21
First celebrity sex tapes dTttZHPfjMRSKYarcJO 2010/03/14 09:46
Buy amy fisher sex tape FTeZbvuEHiBgyeEDS 2010/03/14 10:11
britney spears sex tape uGBIOYdCLfHvzgiFJfl 2010/03/14 10:36
shemale sex savwpWNEtxkOZF 2010/03/14 11:01
Buy kim kardashian sex tape IAmDWXrZ 2010/03/14 11:26
no credit check loans free BFRMRrRPKUwkmoDcHSz 2010/03/14 11:51
simple interest loan calculator for you QSuxkfOMlxaOXtlCek 2010/03/14 12:32
Cheapest student loan forgiveness DxoLRpwKp 2010/03/14 13:13
knock off coach purses pICmaSvY 2010/03/14 13:54
replica coach purses for you WNQyWHrnBROk 2010/03/14 14:35
insurance sample cancellation letter here nypyNSnVwB 2010/03/14 15:16
All about watch my wife VUobtwegzqlYCEwTOv 2010/03/14 15:57
xanax online overnight shipping here iWrNbxPHCLoUHH 2010/03/14 16:38

EDIT FEED LATEX FOCUS RESP

#aao still doesn't work?

plugin
5
user
2009/10/17 19:03
2010/03/13 18:51

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
rqkmmiktcy wFLPQRFRbJThuZUs 2010/03/13 18:51

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

&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

Sun, 14 Mar 2010 17:00:53 +0900
Powered by RBBS 1.0.18.