validation not working: function not defined error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ditditsasa
    New Member
    • Mar 2012
    • 17

    validation not working: function not defined error

    this javascript cant run error comes to firefox as function not defined

    Code:
    function chk_hash_fn()
    {
     if(document.getElementById("site_id").value=='')
       {
        alert("Enter Facility");
    	document.getElementById("site_id").focus();
    	return false;
       }
    }
    Last edited by Niheel; Mar 30 '12, 06:04 AM.
  • johny10151981
    Top Contributor
    • Jan 2010
    • 1059

    #2
    are you sure that you don't have other error? because if there is a scripting error then your browser will not be able to find your function.

    Comment

    • ditditsasa
      New Member
      • Mar 2012
      • 17

      #3
      thanks for ur reply, dont mistake me i cant give else statement, then it runs sucessfully sorry. then i want to redirect a login page. i have three text box. these values are get by php and passed through the ajax url.how can i do that

      Comment

      Working...