| Author |
Disabling a field in java script
|
Vijayalakshmi Karthikeyan
Greenhorn
Joined: Jul 23, 2010
Posts: 27
|
|
I have a dynamic page
I just want to disable a field based on a selection of combo box..
Here is my code
On the view source-->
But it is not working. 1st alert gives me false and second alert gives me true. But on the page it is not disabled.
Can any one guide me
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56151
|
|
|
Why all the complicated referencing? Just give the element an id value, and use the id with document.getElementById().
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
|
Not sure what you combo box is, but is it causing the page to post back or something which is resetting the page?
|
 |
Vijayalakshmi Karthikeyan
Greenhorn
Joined: Jul 23, 2010
Posts: 27
|
|
Hi .
Am very sorry for late reply.
The form was fully dynamic and they were using some inner HTML.
Mistake was on my side. I have given wrong name. I found and corrected it.
Thank you all. .
|
 |
 |
|
|
subject: Disabling a field in java script
|
|
|