Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

onchange function

 
Awais Bajwa
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

A.B
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic