Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes HTML, CSS and JavaScript and the fly likes Checking for value on load... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Checking for value on load..." Watch "Checking for value on load..." New topic
Author

Checking for value on load...

K Robert
Ranch Hand

Joined: May 16, 2003
Posts: 116
I need to identify the value of a checkbox on load of a page. If it is checked, I need a button enabled. If not, I need it disabled. How do I do this and what event do I put the script in?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Basic code:


Eric
K Robert
Ranch Hand

Joined: May 16, 2003
Posts: 116
Thanks! I tried this, but it doesn't seem to work. I just change the names to the required objects and input as is, right?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60752
    
  65

Do you have multiple check boxes with the same name?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
K Robert
Ranch Hand

Joined: May 16, 2003
Posts: 116
No, just one checkbox.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
show us some code....

Eric
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Checking for value on load...
 
Similar Threads
Color setting
property loading in castor
Color Rows of a Table
how can i get the path from which resource bundle gets its bundle file
best approach to compare a string value