File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Javascript Problem with onchange event Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Javascript Problem with onchange event" Watch "Javascript Problem with onchange event" New topic

Javascript Problem with onchange event

Chris Cornelius
Ranch Hand

Joined: Aug 02, 2005
Posts: 48

I currently have a form that I use javascript to display/hide form elements:

I want to add to this form a script to disable everything but a few specified elements, including the function to still hide/display them with a
onchange on a set of radio buttons:

Here is the html code to call the hide/display the div:

At the moment, I cannot hide/display anything because it appears LoadIt() is disabling the onchange. Any ideas on how to enable hideAll()?


Chris Cornelius
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
Make your function not disable the radio button?
Chris Cornelius
Ranch Hand

Joined: Aug 02, 2005
Posts: 48
Thanks Eric,

Yeah, I thought I had set the radio buttons to enabled through the name attribute. I went back and gave each one an individual id and enabled them
and that works.

It is sorta covered in the JavaRanch Style Guide.
subject: Javascript Problem with onchange event
It's not a secret anymore!