Different topic from the last.
With this code, when I select an option from the first box, the 2nd box populates with the options. But where are the values of the 2nd box? I am trying to have it stored in my Database for both boxes, the first one works, but the 2nd one doesent.
[CODE] <head>
<script type=”text/javascript”>
function updateEvent(page){
var type = document.getElementById(“type”);
/* Reset old types if the country has been changed */
var oldLength = type.length;
for (i = oldLength; i >= 0; i–)
type.options[i] = null;
/* Set up the types for the country codes */
var eventType = new Array();
eventType[“Wedding”] = new Array(“Ceremony”,”Reception”,”Ceremony & Reception”);
eventType[“School”] = new Array(“Dance”,”Prom”);
for(i=0;i<eventType[page.value].length;i++){
type.options[i] = new Option(eventType[page.value][i],eventType[page.value][i]);
}
}
</script></head>
<select name=”page” id=”page” onchange=”updateEvent(this);” value='<? echo ($_REQUEST[page]); ?>’>
<option selected value=”<? echo ($_REQUEST[page]); ?>”><? echo ($_REQUEST[page]); ?></option>
<option value=”Wedding”>Wedding</option>
<option value=”School”>School</option>
</select>
<select name=”type” id=”type” value='<? echo ($_REQUEST[eventtype]); ?>’>
<option selected value=”<? echo ($_REQUEST[page]); ?>”><? echo ($_REQUEST[eventtype]); ?></option>
</select>