Jump to content

Cache Problem? Maybe?


Darkness

Recommended Posts

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

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...