dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: IFrame that doesn't affect the history.

  1. #1
    Join Date
    Dec 2008
    Posts
    2

    IFrame that doesn't affect the history.

    In my page I need to be able to display my basket which is located at external URL (and must be located there) in a div that floats above the content of the page and opens and closes when items are added to the basket. I know this can easily be done with an iframe and some JavaScript and CSS but if the user clicks a link inside the basket it is recorded in the history and consequently when it is closed pressing the back button appears to have no effect (in IE it actually gives an error because the iframe has been destroyed so it canít send it back.)

    I have tried recording the number of times the iframeís onload event fires and then using history.go(1 - i); where i is the number of times the onload has run (the 1 - is to take into account the first onload which doesnít register in the history) but this doesn't work because if the user uses the back or forward button the onload event fires but it is not recorded in the history.
    So does anyone know of a way of stopping the iframe from messing up the history?

    P.S. It doesn't need to necessarily be done with an iframe as long as it can display the external page and allow navigation but not interfere with the history.

  2. #2
    Join Date
    Dec 2008
    Posts
    2
    bump

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles