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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

to cancel a mouseclick 1

Status
Not open for further replies.

Rydel

Programmer
Feb 5, 2001
376
CZ
I have a submit button:

Code:
<input type=&quot;submit&quot; name=&quot;sub1&quot; onclick=&quot;checkIt()&quot;>

I'd like to cancel mouse click inside the function checkIt() in case some condition is true (e.g. some data is missing).

Thanks a lot in advance!
---
---
 
put checkIt in the onsubmit of the form instead:

<form name=&quot;benluc&quot; action=&quot;benluc.asp&quot; onsumbit=&quot;return checkIt()&quot;>

then just have checkIt return false at any point that is bad jaredn@eae.net -
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top