Results 1 to 3 of 3

Thread: Retain current IFrame URL on page Refresh

  1. #1
    Join Date
    Mar 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Retain current IFrame URL on page Refresh

    Hello

    First the page in question is located here
    http://www.pwnnip.com/3.0/forum.asp

    I am using your auto-resize script for the iframe which works great, thanks

    My problem is, when some refreshes the page, by hitting f5 or w/e, the iframe is reset to the orginal address (http://www.pwnnip.com/3.0/phpbb/) I would like them to stay where they are currently instead.

    For example, someone goes to General Disucssion and wants to see if anyone posted anything new so they hit refresh, they end up back at the forum index, I would like to stop that from happening somehow and have them stay at General Disucssion, or where ever they happen to be.

    I've been searching for awhile and haven't found anything, so a heads up if this isn't possible too would be great

    BTW I am very familar with ASP and only marginally familar with javascript (can tell what's going on in a script but don't really know how to write it).

    So I am basically looking for a way to grab the current address of the iframe and set it as a variable to be used in the iframe src tag. So any time they navigate to a new page the the variable is reset to the current page.

    Thanks very much for your time,
    Bre

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    You can't make it refresh just a single frame, but you can store a cookie that would reload the proper content frame. This would be better done serverside, but it can be done with javascript.

    Since you're using ASP you can also use a session variable. You can even do the cookie bit in ASP.

    If you need javascript help, I'll defer to people a lot more expert than I as far as the actual scripting.

  3. #3
    Join Date
    Mar 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    alrighty thanks

    I ended up taking the forum out of the frame but I will look into it further for future sites.

    thanks again!

Bookmarks

Posting Permissions

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