Click to See Complete Forum and Search --> : [RESOLVED] Is this allowed in a form header?


jasonyoung
02-26-2006, 09:26 PM
I have a form, which I need to execute 2 onclick events for the submit button. Is this allowed? Removing one or the other allows the form to submit. When both are present it will not do anything when I submit.

Here is the form tag which fails:

<form name="agreeform" onsubmit="return formCheck(this)" onSubmit="return defaultagree(this)" action="<?php echo $_SERVER['PHP_SELF'] ?>?form=yes" method="POST" onKeyUp="highlight(event)" onClick="highlight(event)">

Thanks!

laserlight
02-26-2006, 09:57 PM
You could combine them:
<form name="agreeform" onsubmit="return formCheck(this); return defaultagree(this)" action="<?php echo $_SERVER['PHP_SELF'] ?>?form=yes" method="POST" onKeyUp="highlight(event)" onClick="highlight(event)">

jasonyoung
03-01-2006, 07:20 PM
Thank you! I saw the ; on an example somewhere else, but it didn't look like it belonged. I deleted it. OOPS.

All better now. Thank you.