/    Sign up×
Community /Pin to ProfileBookmark

can someone help me with this script!!

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>


__________________

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@BeauchampMar 21.2003 — 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
×

Success!

Help @strider spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.26,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...