469,623 Members | 1,030 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,623 developers. It's quick & easy.

checking something before link activates

i've got a link

<a href="whatever">click</a>

i'd like to check and make sure of something before the user is
allowed to go to the link target.

<a href="whatever" onclick="javascript: if (ok) goto target">click</a>

or

<a href="whatever" onclick="javascript: if (!ok) stop">click</a>

how can i do this

thx
Jun 28 '06 #1
1 1353
ppcguy wrote:
i've got a link
<a href="whatever">click</a>
i'd like to check and make sure of something before the user is
allowed to go to the link target.


See: http://www.javascripttoolbox.com/bestpractices/#onclick

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Jun 28 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by noor | last post: by
8 posts views Thread by Steve | last post: by
2 posts views Thread by Aaron Reimann | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.