Not a Member Yet,
Click here to Register
How do you like the new design?
It's cool, great job
[tally: 70%] 70%
It's okay
[tally: 20%] 20%
Its OK but I liked the old layout better
[tally: 0%] 0%
Please bring the old one back
[tally: 10%] 10%

votes: 10

ID: 26
Viewed: 4531
Added: Nov 23, 2001
Version:
Snippet uploaded by: snippet
Written By: Unknown
Demo: Sorry, no demo



User Rated at: 5 Stars5 Stars5 Stars5 Stars5 Stars
Rate This:

Thank you for your vote. Please wait...

It appears you already voted for this snippet

It appears your vote value was empty

changes select options depending on last selection in first select box.

<!---Head--->
none

<!---Body--->


  <form name="sels" action="" >
  Select criteria  

<script language="Javascript">
var list1Array = new Array("('-----','',true,true)",
"('list1')",
"('list1')",
"('list1')",
"('list1')",
"('stuff for list 1')");

var list2Array = new Array("('-----','',true,true)",
"('list2')",
"('list2')",
"('list2')",
"('list2')");

var list3Array = new Array("('-----','',true,true)",
"('list3')",
"('list3')",
"('list3')",
"('list3')",
"('stuff for list 3')");



function pop(inForm,selected)
{
var selectedArray = eval(selected + "Array");

while (selectedArray.length < inForm.category.options.length)
{
inForm.category.options[(inForm.category.options.length - 1)] = null;
}

for (var i=0; i < selectedArray.length; i++)
{
eval("inForm.category.options[i]=" + "new Option" + selectedArray[i]);
}

if (inForm.platform.options[0].value == '')
{
inForm.platform.options[0]= null;
if ( navigator.appname == 'Netscape')
{
if (parseInt(navigator.appVersion) < 4)
{
window.history.go(0);
} else {
if (navigator.platform == 'Win32' || navigator.platform == 'Win16')
{
window.history.go(0);
}
}
}
}
}

</script>

<select name="platform" onChange="pop(document.sels, document.sels.platform.options[document.sels.platform.selectedIndex].value)">
<option value=list1 >List 1</option>
<option value=list2 >List 2</option>
<option value=list3 >List 3</option>
</select>
<select name=category>
<option >-----</option>
<option >pick me *</option>
<option >pick me 2 *</option>
<option >pick me 3 *</option>
<option >pick me 4 *</option>
<option >pick me 5 **</option>
</select>

</form>


No Comments to show

Please completely fill out the form below if you want to review this snippet. All reviews are subject to validation.


Replying to a Comment...


Adding your comment. Please wait...

Thanks for adding your comment!. After further review it will be added.

There was a problem adding your comment. Please try again.

Please complete all the fields in the form before sending.

© 2002 - 2017 snippetlibrary.com All Rights Reserved. Conditions