Click to See Complete Forum and Search --> : Saving dynamically changed elements?


craiger316
February 20th, 2003, 01:41 PM
Hi there, I was wondering if there is a way to get Internet Explorer to actually save a page after it has been manipulated in via javascript?

If you run this example:

<html>
<body>
<a href="javascript:void(0);" onClick="document.getElementById('bleh').innerHTML = 'badbye';document.execCommand('SaveAs',true,'c:\\Documents and Settings\\%username%\\My Documents\\myFile.html');">
Click here to Save
</a>
<span id="bleh">hello</span>
</body>
</html>

What will happen is the span will update from hello to badbye and then the user will be asked to save the webpage. However, the webpage that is saved is the original page (most likely just copied from cache) and not the new modified page.

Any ideas?

Thanks,

Craig.

antares686
February 20th, 2003, 03:43 PM
Actually the source of the page is never effected by the javascript and does not change, only the visual in memory output that does. I am not aware of a way to do like you example except maybe to set a variable as the innerHTML of your window after the alteration and save the variable data.