progNewbie
progNewbie

Reputation: 4832

How to prevent browser selecting option in selectbox from memory

I have the following problem:

I have multiple selectboxes in plain html. I receive data from a xmlhttprequest and update the selectboxes. Sometimes I don't get data to all of the selectboxes so I just update those, for which I get new data.

This works fine, but when selecting any option in one of the select boxes and then reloading the site, and making new xmlhttprequests and if its the case, that this particular selectbox doesn't get updated, It has the option selected, which I picked before making the reload.

Why is that the case? And how can I prevent this?

Thank you for your advice.

Upvotes: 0

Views: 146

Answers (1)

Try turning off form autocomplete on the whole form or at least on the selectboxes: http://www.w3schools.com/tags/att_input_autocomplete.asp

<form autocomplete="off">

This may help

Upvotes: 1

Related Questions