[Javascript] get link to execute script rather than load page
Golden Troll
gtroll at msn.com
Wed Feb 6 13:22:13 CST 2002
Try this
<A href="theimageorpage.url" onClick="OpenNewWindow(); return
false">link</a>
by using the actual link of the page your not cutting out people who for
any reason don't have js
Scott
www.GoldenTroll.com
-----Original Message-----
From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On
Behalf Of Lau
Sent: Tuesday, February 05, 2002 11:46 PM
To: javascript at LaTech.edu
Subject: [Javascript] get link to execute script rather than load page
How do I get a link to execute some script rather than load another
page?
(no I don't want to use a button)
The best I can get is:
<A HREF='#' onclick='Javascript: OpenNewWindow()'>
However, this scrolls the page back up to the top - which I don't want
to
happen.
I tried
<A HREF='Javascript: OpenNewWindow()'>
and
<A HREF='Javascript: void OpenNewWindow()'>
but they both give me a syntax error
Can anyone tell me how to do this?
Peace
Lau
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript
More information about the Javascript
mailing list