Click to See Complete Forum and Search --> : Help Me!!


strider
03-21-2003, 09:48 AM
well I have a problem, well more than a problem is that i dont know how to do it, I need a boton that select all, copy, open word (.doc files) and paste it in word(in a new file), help me please!! here is what I have done:confused: :( tell me what I have to change to it to do this, thanks for your time and effort.
<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="something.wrd"}
</script></head><body>
<form name="frm1"><textarea name="holdtext" style="visibility:hidden"></textarea></form>
<input type=button onclick="copy();openword()" value="Copy open and paste in word"><br>
<br>this is supposo to copy the whole page and pate it in a new document of word
</body></html>

Jona
03-21-2003, 03:09 PM
I already told you it's not possible with JavaScript. Just create and save your own .doc file and do this:

function openword(){location="yourFile.doc"}

You cannot make the user paste it in a new file. You can only tell them to paste it. JavaScript only works on a Web page and not in Word.

Nedals
03-21-2003, 04:51 PM
Strider,
No matter how many posts you put on this board, the answer is NOT GOING TO CHANGE!