You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "yuensunlam@yahoo.com" <yu...@yahoo.com> on 2003/11/20 04:57:23 UTC

JavaScript function inside JSP not working

I include the following javascript function in my .jsp
file, but this function is not being called at all.  I
won't even get any javascript error on build if I
tried to change to some bogus function name, Can
anybody please tell me why?

What I want to do here is: disable the submit button
until the required text field was filled. 

<SCRIPT LANGUAGE="JavaScript">
function checkField() {
return(!document.form1.textfield.value == "")
}
</SCRIPT> 
 
 <html:form
      action="myAction"
      name="form1"
      onsubmit="checkField()">
 <html:text property="textfield">
 <html:submit property="submit" value="Submit">
 </html:form>



__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org