This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes onchange function Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "onchange function " Watch "onchange function " New topic

onchange function

Awais Bajwa
Ranch Hand

Joined: Jan 16, 2001
Posts: 191
Hi folks, I have the following function on the onchange event of the html:select
I am calling like this.

<select name="value(registraionTypeId)" onchange="showHide"

and the function is

and the problem is on selecting cancel it changes the value of the list to the newly selected value.

Any Javascript guru can answer this?

Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
Well I do not see how that code would be running in the first place. You are missing a few ().

If you want to reset the value back to what it was before than you are going to have to change it back with code, return is not going to do anything.

I agree. Here's the link:
subject: onchange function
Similar Threads
showing fields dynamically
Need Help on HTML
blink onInternet Explorer
onFocus display help
div show/hide with struts2