Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
inet
active_desktop
active_scrptng
asp.components
asp.db
asp.general
comctl32
comp.packaging
components.dev
dbweb
dhtml_editing
docobjects
html_authoring
html_objmodel
iis
iis.ftp
iis.security
iis.smtp_nntp
indexserver
misc
mshtml_hosting
scripting.jscript
scripting.vbscript
sdk_setup
shell_objmodel
urlmonikers
webbrowser_ctl
wininet
  
 
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?   
David Patow wrote:
> So, how can I do this?

maybe in the tag itself set the src to 'about:blank'

then, in the main documents onload handler, set the URL's at that point using

  document.getElementById('FrameId').src = 'generated url'

D?
date: Thu, 27 Oct 2005 23:55:53 -0700   author:   GrandNagel

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

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us