hyperlinks using ECMAScript

D

drak10687

I want to make my hyperlinks open in a new window.
After searching I found out how to do it using the html code approach, but
on the microsoft office help site there was also an ECMAScript approach
described here:

http://office.microsoft.com/en-us/assistance/HA011587451033.aspx

however when i tried that, upon opening the page with that link explorer
declare "blocked content" and when i "unblock" it and click on the link,
nothing happens and at the bottom of page it says "error"

if anyone knows how to make this work, it would be greatly appreciated as
this way i can keep the links i have allready made and organised into tables
(i have up to 20 links per page), thanks.
 
D

drak10687

sorry for wasting space, found the answer after some more searching in
another thread. It answers my question, and hopefully everyone elses. here
it is written by "glengroves":

"The problem with the script on page HP030805631033.aspx is that it includes
'comment out' code, meant to prevent older browsers from displaying the
script as HTML. The script does work if you remove the 'comment out' code.

The script on page HP030805631033.aspx is: <script language="JavaScript"
type="text/javascript"> <!-- function Show(Url, Name, Features) {
window.open(Url, Name, Features); } // --> </script>.

To make it work use: <script language="JavaScript" type="text/javascript">
function Show(Url, Name, Features) { window.open(Url, Name, Features); }
</script>

This is the same script, but without the 'comment out' code of <!-- and //
-->. "

also to avoid any more problems (maybe im just stupid) if the it is a
filename that you are linking to, and it is in a sub folder, make sure you
divide the directories with a "/" like urls, NOT a "\" , ex: folder
name/file.doc
 
D

DavidF

No need to apologize for wasting space...far from it. We thank you for
posting not only the question, but especially the solution. This is how we
all learn. In fact there is another thread today that is having problems
with the same script, and perhaps your post will help them.

Thanks.

DavidF
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top