Krunal Parate

Krunal Parate

  • NA
  • 30
  • 13.9k

showing javascript code on webpage....its fuctioning is not

Sep 5 2015 6:56 AM
< script type="text/javascript"> function Validate(v) { if(v!=""){ var error="" ; document.getElementById("lblErr").innerHTML=""; var value1=document.getElementById("txtval1").value; var value2=document.getElementById("txtval2").value; if(value1="") error +="Please enter value in textbox1"+"

"; if(value2="") error +="Please enter value in textbox2"+"

"; if(error!="") { document.getElementById("lblerr).InnerHTML=error; return false; } else { __doPostbBack(event,"") return true; } } else { document.getElementById("lblerr").InnerHTML="Please select any one option"; return false; } }< script type="text/javascript"> function Validate(v) { if(v!=""){ var error="" ; document.getElementById("lblErr").innerHTML=""; var value1=document.getElementById("txtval1").value; var value2=document.getElementById("txtval2").value; if(value1="") error +="Please enter value in textbox1"+"

"; if(value2="") error +="Please enter value in textbox2"+"

"; if(error!="") { document.getElementById("lblerr).InnerHTML=error; return false; } else { __doPostbBack(event,"") return true; } } else { document.getElementById("lblerr").InnerHTML="Please select any one option"; return false; } }

Answers (1)