hi, i have a list of input boxes. i want that user can make change only in any one of them. if value for second is tried to change get an alert. how can i do that. thanks, dhriti.
brad balmer
Ranch Hand
Joined: Mar 08, 2004
Posts: 57
posted
0
Add some javascript: In the onchange="" call a function looking to see if an attribute value has already been changed from false to true; <script> var changed=false; function changed() { if(changed == true) return false; else { changed = true; return true; } </script> Now, don't quote me exactly on the javascript above, but something like that.
Prakash Dwivedi
Ranch Hand
Joined: Sep 28, 2002
Posts: 451
posted
0
This looks a javascript problem (not jsp). You can define a global flag in javascript. Whenever user makes changes in any of the input set that flag to true. Also before applying the changes see if the flag is not already true, if it is already true give an alert.
Prakash Dwivedi (SCJP2, SCWCD, SCBCD)
"Failure is not when you fall down, Its only when you don't get up again"
Bear Bibeault
Author and opinionated walrus
Marshal