Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved

Join Date: Feb 2009
Posts: 83
Reputation: ahmksssv is an unknown quantity at this point 
Solved Threads: 7
ahmksssv ahmksssv is offline Offline
Junior Poster in Training

Validations?

 
0
  #1
Mar 2nd, 2009
Hi frnds....

i need Javascript Validations...these validations by using onchange or onblur events..i mean when focus out from a textbox or any field then immediatley shows the error msg and focus will be at error field(not after submitting the form)..i want error immediatley focus out from the field...plz provide 4 or 5 fields, after i can manage...

i am having validations code..but in this way idon't have,basically i am not good in javascript...

plz help me asap..

Thank u...
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 83
Reputation: ahmksssv is an unknown quantity at this point 
Solved Threads: 7
ahmksssv ahmksssv is offline Offline
Junior Poster in Training

Re: Validations?

 
0
  #2
Mar 2nd, 2009
Originally Posted by ahmksssv View Post
Hi frnds....

i need Javascript Validations...these validations by using onchange or onblur events..i mean when focus out from a textbox or any field then immediatley shows the error msg and focus will be at error field(not after submitting the form)..i want error immediatley focus out from the field...plz provide 4 or 5 fields, after i can manage...

i am having validations code..but in this way idon't have,basically i am not good in javascript...

plz help me asap..

Thank u...
Hi reply plz..
If u have any problem with my english plz ask me..
this is urgent for me....i have to complete this today only..

plz reply only for 3 or 4 fields...(when we press tab than immediatly display error beside at the text box or alert box..)

Thank u...
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,744
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 330
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: Validations?

 
0
  #3
Mar 2nd, 2009
First of all, this question belongs to Javascript forum. Its a javascript related question. 2nd, Post your code and tell us what is not working. We aren't 24/7 free coding service to provide you with ready made code when you say "Please help me asap", or, "Its urgentttt".
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 1,072
Reputation: Shanti Chepuru is on a distinguished road 
Solved Threads: 98
Shanti Chepuru's Avatar
Shanti Chepuru Shanti Chepuru is offline Offline
Veteran Poster

Re: Validations?

 
0
  #4
Mar 2nd, 2009
Here is some expectablel solution not sure...
for example , if you have a quantity field then , if we entered any letters on that it will show an immediate alert "Please Enter Only Numbers (0-9)"
if this is your expected solution . then the following is the code for that...if not post clearly....
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <form name="exampleform" method="post" action="">
  2. <input name="qty" type="text" id="qty" value="" onKeyUp="Only_Num(this.id)" size="3" maxlength="5">
  3. </form>
function:
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. function Only_Num(id)
  2. {
  3. if(isNaN(document.getElementById(id).value))
  4. {
  5. alert("Please Enter Only Numbers (0-9)..");
  6. document.getElementById(id).value='';
  7. document.getElementById(id).focus();
  8. }
  9. return;
  10. }
Be intelligent, But Don't try to cheat.. Be innocent But Don't get cheated..
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 83
Reputation: ahmksssv is an unknown quantity at this point 
Solved Threads: 7
ahmksssv ahmksssv is offline Offline
Junior Poster in Training

Re: Validations?

 
0
  #5
Mar 2nd, 2009
Originally Posted by Shanti Chepuru View Post
Here is some expectablel solution not sure...
for example , if you have a quantity field then , if we entered any letters on that it will show an immediate alert "Please Enter Only Numbers (0-9)"
if this is your expected solution . then the following is the code for that...if not post clearly....
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <form name="exampleform" method="post" action="">
  2. <input name="qty" type="text" id="qty" value="" onKeyUp="Only_Num(this.id)" size="3" maxlength="5">
  3. </form>
function:
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. function Only_Num(id)
  2. {
  3. if(isNaN(document.getElementById(id).value))
  4. {
  5. alert("Please Enter Only Numbers (0-9)..");
  6. document.getElementById(id).value='';
  7. document.getElementById(id).focus();
  8. }
  9. return;
  10. }

Hi frnds..
Sry for posting this question in php forums...
Thank U shanthi for giving quick reply...
Now i can manage by using this one...

Hi naveen..
i am not asking about readymade code..i need just how to use onchange event ...i am having good validation code, but,that is working only on submitting the total form.....anyhow i am sry 4 distrubing u...

Thank u Naveen..
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,744
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 330
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: Validations?

 
0
  #6
Mar 2nd, 2009
Ehm.. Okay
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC