PDA

View Full Version : How do I save my current web page using java script ?


kdb
08-10-2002, 06:24 PM
I have a form on my web page. Clicking on button in that form should allow me to save the current web page onto user's machine. How do I do this using javscript ?

Mr J
08-10-2002, 11:57 PM
try this:

<script language="JavaScript" type="text/JavaScript">
function saveIt(){
document.execCommand("SaveAs")
}
</script>>

<a href="javascript:saveIt()">Save This Page </a>

justame
08-11-2002, 02:19 AM
/me just a whispers® to mrj...
ummm did you mean to have the just a double® >> ???
aka...</script>> s/b </script>

MUBNET
08-11-2002, 08:40 AM
Mr j
No problem.It's the true one;

<script language="JavaScript" type="text/JavaScript">
function saveIt(){
document.execCommand("SaveAs")
}
</script>

<a href="javascript:saveIt()">Save This Page </a>

Godd luck :thumbsup:

Mr J
08-11-2002, 02:15 PM
Thanks friends genuine typo there

:thumbsup: :thumbsup: :thumbsup: