Please help me. I have 2 web pages. first webpage has a drop down with 4 options. second webpage has another dropdown with 4 options, however, you get an error message if you choose the same option as the first drop down.
This all works perfect if both drop down menus are on one page, however, I need it to be on separate pages so i need a cookie to hold what option i picked for the first drop down so the second drop down knows to give me that error if i choose the same option… Can someone help me with the cookie part. Here is my code…
dropdown1.html (first drop down menu)
<form name="input" action="start2.html" method="get">
First Choice: <select name="ThursAM_First" size="1" id="ThursAM_First"
onchange="return no_dupes(this,start2.html.ThursAM_Second…
<option value="" selected>• choose •</option>
<option value=""></option>
<option value="T1">T1</option>
<option value="T2">T2</option>
<option value="T3">T3</option>
<option value="T4">T4</option>
</select>
<input type="submit" value="Submit" />
</form>
<script language="javascript" src="script.js"></script>
______________________________________…
dropdown2.html (second drop down menu)
<form>
Second Choice: <select name="ThursAM_Second" size="1" id="ThursAM_Second"
onchange="return no_dupes(this,ThursAM_First)">
<option value="" selected>• choose •</option>
<option value=""></option>
<option value="T1">T1</option>
<option value="T2">T2</option>
<option value="T3">T3</option>
<option value="T4">T4</option>
</select>
</form>
<script language="javascript" src="script.js"></script>
scrip.js (here is my .js file with all my javafunctions)
function no_dupes(oSelect)
{
var f = document.forms[0];
if (f.ThursAM_First.value == f.ThursAM_Second.value)
{
alert("\
Sorry, you already choose this point value for round 1. Please select another!\
Thanks.");
oSelect.selectedIndex = 0;
return false;
}
}