in reply to Re: JScript and Perl
in thread JScript and Perl

Thanks. I have corrected the mistakes and able to compile. But I it is working ie. does not call that function (ValidateForm). No alert message is coming. This is the part of the JScript.
function ValidateForm(){ var Phone=document.inFOrm.Mobile alert("In JS") if ((Phone.value==null)||(Phone.value=="")){ alert("Please Enter your Phone Number") Phone.focus() return false } }

Replies are listed 'Best First'.
Re^3: JScript and Perl
by xorl (Deacon) on Sep 29, 2006 at 19:03 UTC
    Now we're into the world of some other language. In your browser turn on the javascript console (in Mozilla you just type javascript: into the location bar not sure how to do it in IE). You need to find out what kind of error happens when you click on the Submit button. I suspect since your calling ValidateForm(this.form) when you click the button, your function should be modified to use the passed variable...
    function ValidateForm(foo){ alert("In JS"); if ((foo.Mobile.value==null)||(foo.Mobile.value=="")){ alert("Please Enter your Phone Number"); foo.Mobile.focus(); return false; } }
    Also in your code I supsect inFOrm should be inForm which might just fix your problem without rewritting the function like I just did.