By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,254 Members | 2,418 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,254 IT Pros & Developers. It's quick & easy.

validation not working: function not defined error

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

Expand|Select|Wrap|Line Numbers
  1. function chk_hash_fn()
  2. {
  3.  if(document.getElementById("site_id").value=='')
  4.    {
  5.     alert("Enter Facility");
  6.     document.getElementById("site_id").focus();
  7.     return false;
  8.    }
  9. }
Mar 30 '12 #1
Share this Question
Share on Google+
2 Replies

P: 1,059
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.
Mar 30 '12 #2

P: 17
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 can i do that
Mar 31 '12 #3

Post your reply

Sign in to post your reply or Sign up for a free account.