Or use an image input type...
<script language="javascript">
functio myfunction() {
//validation here
if (something) { alert("problem"); return false; }
return true;
}
</script>
<form onsubmit="return myfunction();">
<input type="image" src="images/EnterButton.gif" />
</form>
I'm betting that's the most thorough solution.
> Instead of "document.ViewerInfo.submit();" do a function
> call:
> "javascript: validateFrm();", in that function either
> "return false" or
> "document.ViewerInfo.submit();"
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Bruce Sorge
> Sent: Sunday, June 29, 2003 6:47 PM
> To: DFW CFUG List
> Subject: OT: JS Question
> Say,
> I have this enter image that looks like this:
> <a href="javascript:document.ViewerInfo.submit();"><img
> src="images/EnterButton.gif" border="0">
> What I want to do is to also be able to call my form
> validation
> JavaScript when the user submits the form. I tried using
> an onSubmit
> routine in the Form tag, but that is not working. Any
> thoughs on this?
> Thanks,
> Bruce
> -----------------------------------------------
> To post, send email to [EMAIL PROTECTED]
> To unsubscribe:
> Send UNSUBSCRIBE to [EMAIL PROTECTED]
> To subscribe / unsubscribe: http://www.dfwcfug.org
> -----------------------------------------------
> To post, send email to [EMAIL PROTECTED]
> To unsubscribe:
> Send UNSUBSCRIBE to [EMAIL PROTECTED]
> To subscribe / unsubscribe: http://www.dfwcfug.org
s. isaac dealey 972-490-6624
new epoch http://www.turnkey.to
lead architect, tapestry cms http://products.turnkey.to
tapestry api is opensource http://www.turnkey.to/tapi
certified advanced coldfusion 5 developer
http://www.macromedia.com/v1/handlers/index.cfm?ID=21816
-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To unsubscribe:
Send UNSUBSCRIBE to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org