Darkness Posted June 8, 2009 Report Share Posted June 8, 2009 (edited) I have an AJAX script which appends the following to a span (well, it's similar): <select id='select_thing' onchange='functionhere();'><option value='1' selected>1</option><option value='2'>2</option></select> Whenever functionhere() is called, it repeats it (appends the above into that span again).If you select two, it will go back to 1, which it's supposed to do (since, when the AJAX is called, it just puts the above code into the innerHTML).However, if I say: alert(select_thing.value); after changing the value to 2, it always says 2, even though the selected value is 1.So, basically, it seems to be caching the first selected option or something.Any fix?Thanks Edited June 8, 2009 by Darkness Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now