[Javascript] get link to execute script rather than load page
Lau
lau at goldenweb.com.au
Wed Feb 6 01:45:34 CST 2002
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
More information about the Javascript
mailing list