Results 1 to 5 of 5

Thread: Setting a default for an targetted link into an iframe.

  1. #1
    Join Date
    Jun 2008
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Setting a default for an targetted link into an iframe.

    Right, this is probably the world's most stupid question. I have a site with three iframes on the homepage. One of them is there to indicate different levels. I have this set so I can click on a link and target that iframe. My problem is that, when the page refreshes, the iframe goes back to being blank. Is there any way that I can set the default to the last page populated?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    This actually varies by browser. The default in Mozilla based browsers like FF is to repopulate all iframes and frames with whatever they were showing. IE is different, generally reverting to the page as it was when first loaded, but sometimes not.

    There is no way to ensure what you are talking about via javascript. Users can always disable it. And folks generally know what their browsers will do on refresh, so this really isn't anything to worry about. But if you wanted to set it up so that at least people with javascript and cookies enabled would have a smoother experience, you could set a cookie and read it on page load.

    However, some people would want the refresh to act as they are accustomed to it doing, and would therefore be disappointed by your manipulations.

    A more fool proof method should be able to be developed using server side code.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Captain P (06-25-2008)

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

    Default

    Thanks for this. I'm wondering if I could achieve what I need with an iframe redirect?

  5. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    If you mean by having the user logged in somehow (generically as the current user, or specifically as that user with a specific account), and setting or having already set their level and using that information for redirect on the default page (src attribute of the iframe), yes. That should be able to be done in most server side languages.

    Do you have a server side language available to you, and if so, have you been using it at all?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #5
    Join Date
    Jun 2008
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Basically I've designed an internal company management information site. My problem is that I need to display alerts on a scale from 1 to 7. I've created a command console with links to an iframe on the homepage but it's not populating on any pc but my own. The default is 4 so I have this selected but the problem with that is that on refresh the iframe reverts to 4.

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
  •