I have a javascript function that uses a bunch of selection lists, some containg numbers and some containing text, and was wondering how I could save the selected values so when the user returns to the site the previously selected items are already selected.
So if I had a selection list like the one below and the user picked 4 and yellow then when they returned to the webpage for another visit then the selection lists would already be on 4 and yellow.
So if I had a selection list like the one below and the user picked 4 and yellow then when they returned to the webpage for another visit then the selection lists would already be on 4 and yellow.
Code:
<form style="display: inline">
<SELECT class="FJselect" name="numberloadouts" style="width: 50px" id="FJsloadouts" onchange="LoadoutNUM = this.options[selectedIndex].value;">
<OPTION class="FJoptionBG1" selected value="1">1</OPTION>
<OPTION class="FJoptionBG2"value="2">2</OPTION>
<OPTION class="FJoptionBG1"value="3">3</OPTION>
<OPTION class="FJoptionBG2"value="4">4</OPTION>
<OPTION class="FJoptionBG1"value="5">5</OPTION>
</SELECT>
</form>
<form style="display: inline">
<SELECT class="FJselect" name="loadout" style="width: 50px" id="FJsldts" onchange="LdtNUM = this.options[selectedIndex].value;">
<OPTION class="FJoptionBG1" value="red">red</OPTION>
<OPTION class="FJoptionBG2" value="blue">blue</OPTION>
<OPTION class="FJoptionBG1" value="green">green</OPTION>
<OPTION class="FJoptionBG2" value="yellow">yellow</OPTION>
<OPTION class="FJoptionBG1" value="orange">orange</OPTION>
</SELECT>
</form>