Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

js code needed !

 
Arya Devan
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

i need a javascript code snippet to check if the values entered in two subsequent textboxes are the same. if they are the same i need to display an alert ...

and also i m in need of a session invalidate code... as i m new to programming... plz tel me the exact way in wich i hav to include the code in my program..

thanx in advance.
 
Kj Reddy
Ranch Hand
Posts: 1704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Arya Devan:
hi all,

i need a javascript code snippet to check if the values entered in two subsequent textboxes are the same. if they are the same i need to display an alert ...

and also i m in need of a session invalidate code... as i m new to programming... plz tel me the exact way in wich i hav to include the code in my program..

thanx in advance.


Is the text boxes are random text boxes, i mean you do not know the text boxes names. If you know the text boxes names your job is easier.

Code looks like this:

if(formname.textbox1.value == formname.textbox2.value) {
alert("both textbox1 and textbox2 contents are equal);
}
 
Arya Devan
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanx reddy,

i do know the names of text boxes... but then... i m using




it gives me and error.. i dunno y....

plz help....

thanks again for the reply...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic