Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

onclick() event

Status
Not open for further replies.

tyris

Programmer
Joined
Nov 2, 2000
Messages
311
Location
FR
i have a doubt ... is it possible to manage with the onclick() event in a <a href> tag ?

i wrote this :
<A onclick='test()' href=&quot;toto.html&quot;>link</A>
and i have this error message :
&quot;object doesn't support this property or method&quot;

what's wrong ?

Best regards X-),
Elise
 
I'm no expert, but 2 thoughts ...

Put double quotes around your onClick action, i.e.

onClick=&quot;test()&quot;

If that doesn't work, what does your test() function do?

Greg.
 
yes you're right that was my function ... :) Best regards X-),
Elise
 
Actually, I believe that the onClick is assumed when you use an anchor tag. You probably want to rephrase your tag like this:

<a href=&quot;javascript:test()&quot;></a>

- DB

dgtlby@excite.com
Administrator

UBB Developers Network

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top