JavaScript + File >> Save As..

nilesh.shinde

Junior Member
Apr 14, 2011
6
0
0
HTML + JavaScript

When using the "File >> Save As..." menu option on a JavaScript based popup to save the page for offline access; it does not saves all that is displayed in the popup window. This is only observed in IE browser. Works fine in rest of the browsers such as Firefox.

Please help
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
You'll need to provide some more details, such as what is being displayed in the pop-up, and what of that is not being saved.
 

nilesh.shinde

Junior Member
Apr 14, 2011
6
0
0
for example in the body of the popup i have the following HTML:

<div id="sample1image"><img src="sample1image.jpg" /></div>
<div id="sample2image"><script>document.write("<img src='sample2image.jpg' alt='logo' title='logo' />");</script></div>


First image (sample1image.jpg) downloads fine when using IE "File >> Save As..." option. However, the later one won't. I have no idea why will this happen when using IE.

In Firefox it simply works fine.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
Well the second one isn't an image link. It's a string parameter to document.write. Perhaps IE is more conservative about executing javascript when saving a page to disk. Other than that I have no ideas.
 

nilesh.shinde

Junior Member
Apr 14, 2011
6
0
0
I searched over the web and found one article supporting our findings (though the article is applicable for IE 5). here is the link:

http://support.microsoft.com/kb/198997

It states that - Internet Explorer does not parse the script in a Web page when saving the Web page, and so it is unable to determine when an image or document URL is constructed from within a script.

It does mean that any image whose source is dynamically constructed using javascript / vbscript will not be parsed by IE.