Click to See Complete Forum and Search --> : can someone help me with this script!!


strider
03-20-2003, 10:36 PM
well this code copy the entire page then open an existing file in wordpad, well what I want to do is that copy the whole page, open word from office and paste it there just with one boton, someone told that i have to call a "com" that open word and do the paste in the new fiule of word just with one click, well here is the script!!

thanks but for this code what i have to change to do that?


<html><head><script>
function copy() {
holdtext=document.frm1.holdtext;
holdtext.innerText = document.body.innerText;
//holdtext.innerText = disp.innerText;
Copied = holdtext.createTextRange();
Copied.execCommand("RemoveFormat");
Copied.execCommand("Copy"); }

function openword(){location="somefile.wrd"}
</script></head><body>
<form name="frm1"><textarea name="holdtext" style="visibility:hidden"></textarea></form>
<input type=button onclick="copy();openword()" value="Copy the whole page"><br>
<br>click here!
</body></html>


__________________

Beauchamp
03-21-2003, 05:18 AM
Hi

I'm not a javascript expert but I found the following script when trying to solve my own js problem. You might find elements of it useful:

http://www.whirlywiryweb.com/article.asp?id=/officedocs&xml=0

My problem is this:
I want some javascript that will open an Office document in the appropriate MS Office program from a browser hyperlink, instead of opening the Office program inside the browser window.

The code at whirlywiryweb gives me an 'Error on page'. If you can help, please get in touch.

Thanks,

Beauchamp