| 
	
 | 
 Posted by Neredbojias on 02/05/06 10:56 
With neither quill nor qualm, JF01 quothed: 
 
> Hi, 
>  
> I have an XHTML page with the following DTD Declaration:  <!DOCTYPE 
> html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
>  
> Inside, I have a form with the following format: 
>  
> <form action="login.asp" method="post" id="frm1"> 
> <input type="text" size="30" name="email" id="email"> 
> <input type="button" value="Register" class="formbutton1" id="submit1" 
> name="submit1" onclick=javascript:callsubmit();> 
>  
> Inside the <head> tag, I have the following javascript: 
>  
> <script type="text/javascript"> 
> function callsubmit() 
> { 
>  
> var pwl = frm1.pass.value.length; 
>  
> if (frm1.email.value == "") 
> 	{alert("The e-mail field is required");} 
>  
> else 
> 	{frm1.submit();} 
> } 
> </script> 
>  
> This is designed as a very simple form validation script, and it works 
> perfectly in IE6, but in Firefox 1.5, the javascript does not run.  Can 
> anyone suggest how I can make the script compatible with both browsers? 
 
This probably isn't it, but should be:  onclick="callsubmit()" 
 
--  
Neredbojias 
Contrary to popular belief, it is believable.
 
  
Navigation:
[Reply to this message] 
 |