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.
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.