java script problem
-
hi all,in my page load event,i given as Response.Write("function check(){for(var j=0;j<al.length;j++){if(window.document.Form1.Text3.value==al[j]){alert(al[j])}}}"); btnsubmit.Attributes.Add("onclick","check();"); but when i click the button(btnsubmit)first time it doesnot show alert msg but when i click the same button again it display the alert what is the prob with my code.... :confused: Regards, ayyp
-
hi all,in my page load event,i given as Response.Write("function check(){for(var j=0;j<al.length;j++){if(window.document.Form1.Text3.value==al[j]){alert(al[j])}}}"); btnsubmit.Attributes.Add("onclick","check();"); but when i click the button(btnsubmit)first time it doesnot show alert msg but when i click the same button again it display the alert what is the prob with my code.... :confused: Regards, ayyp
-
hi all,in my page load event,i given as Response.Write("function check(){for(var j=0;j<al.length;j++){if(window.document.Form1.Text3.value==al[j]){alert(al[j])}}}"); btnsubmit.Attributes.Add("onclick","check();"); but when i click the button(btnsubmit)first time it doesnot show alert msg but when i click the same button again it display the alert what is the prob with my code.... :confused: Regards, ayyp
-
hi all,in my page load event,i given as Response.Write("function check(){for(var j=0;j<al.length;j++){if(window.document.Form1.Text3.value==al[j]){alert(al[j])}}}"); btnsubmit.Attributes.Add("onclick","check();"); but when i click the button(btnsubmit)first time it doesnot show alert msg but when i click the same button again it display the alert what is the prob with my code.... :confused: Regards, ayyp
-
Hi, you try this code it works. Response.Write("function check(){alert('hi')}"); btnSubmit.Attributes.Add("onclick","check();");
-
i tried the following...did not encounter any such error.. Response.Write("function check(){alert('a');}") Button1.Attributes.Add("onclick", "check()") you may have to provide more details :)
-
Hi make it function like this , function check() { for(var j=0;j{ if(window.document.Form1.Text3.value==al[j]) { alert(al[j]); return true } } return false; }
hi, I'm not sure what you are trying to do..and i think there may be a problem with your syntax: I tried something similar as follows: function check() { var al=new Array(); al[0]=1; al[1]=2; for(var j=0;j<=3;j++) { //alert(window.document.Form1.Text3.value); alert(al[j]); if(window.document.Form1.Text3.value==al[j]) { //alert("in"); return true; } else { alert("else"); //return false; } } }