Code:
function set_the_cookie(v){
if (v==1)
setcookie(you know what goes here);
else if (v==2)
setcookie(you know what goes here);
else if (v==3)
setcookie(you know what goes here);
else if (v==4)
setcookie(you know what goes here);
}
HTML Code:
<select onchange="set_the_cookie(this.selectedIndex);">
The select will return 0 through however many options it has minus one to the 'set_the_cookie()' function when its value is changed by the user's selection. I left 0 out of the function because I thought that 0 means 0, no cookie. You can also have a final:
Code:
else
do something here if none of the conditions are met
if you like.
Bookmarks