|
|
|
date: Thu, 27 Oct 2005 10:26:17 -0700,
group: microsoft.public.inetsdk.programming.scripting.jscript
back
How to cancel the saveFavorite behavior's onload event?
I'm looking for a way to prevent IE from restoring the URL's of nested
<IFRAME>'s when the user selects a saved favorite.
*BACKGROUND* When the user chooses the /Favorites/Add to Favorites/ menu
command, IE saves not only the URL of the page, but also the URL of all
nested <IFRAME>'s. So, when the user later selects the saved favorite, the
IFrame's are also restored to their URL's. Unfortunately, my app uses URL's
with volatile values in the frames. So, I need a way to prevent IE from
setting the URL's on the nested frames.
*TRIED* The docs say that the onsave and onload events can be cancelled, but
I can't figure out how. "event.returnValue" has no effect. Returning true
or false from my event handler has no effect.
*TRIED* I noticed that the favorite file contains the original SRC=
attribute of the frame, so I tried changing the SRC attribute on the frame
during my onload handler. No effect.
So, how can I do this?
date: Thu, 27 Oct 2005 10:26:17 -0700
author: David Patow am
Re: How to cancel the saveFavorite behavior's onload event?
No dice. In the saveFavorite onload event handler, I tried setting the
<frame>'s SRC= attribute, but that has no effect. I also tried {{
document.frames("theFrame").location.href = "..." }}, but to no effect.
If I use this last {{...}} statement in the BODY onload, then the nested
iframe is set to my desired URL, *but* the server still *first* gets a
request for the iframe's saved URL, which I don't want to happen.
What I'm looking for is a way to either (1) when IE saves the favorite,
prevent it from saving the nested iframe's current URL or (2) when the saved
favorite is invoked, prevent the nested iframe from being restored to the
saved URL.
In this age of complex web pages and AJAX, I would consider this a very
nasty and important problem. Users must be able to save favorites and web
pages must have control over their nested frames. Any more ideas?
date: Fri, 28 Oct 2005 05:53:06 -0700
author: David Patow am
|
|