1

I'm having a drop down with onChange event which will call the javascript method.

but when I change to some value and clicking reset , its reset to orignial value, but the onChange javascript event is not calling.

<select onChange="method1()">
<option>....
</select>

<input type="reset" value="reset" />

After click the reset button, the value is setting to old value but the onChange event is not working...

2
  • 1
    Can you post your code snippet / info that can help us help you? Commented Nov 30, 2010 at 5:30
  • Can you post javascript method too? Commented Nov 30, 2010 at 5:39

1 Answer 1

4

I believe you should be using the onchange event. I've never heard of the valueChange event.

Updated for question edit:

You will need to add a method to the onreset event of your form tag in order for you to run Javascript when your reset button is clicked. See here for more info. This is a simple example, which requires two Javascript functions, formReset and selectChanged.

<form onreset="formReset">
    <select id="s" onchange="selectChanged">
        <option>Hello</option>
        <option>World</option>
    </select>
    <input type="reset" />
</form> 
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.