Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2 Combo/Select Boxes

Status
Not open for further replies.

jiggyg

Programmer
Oct 1, 2007
61
US
Hi!

I'm wondering how to get two combo boxes to work in conjunction w/ each other....

I have one combo box (filterVal) that IS working correctly; this array has both an id[0] and name[1]:
Code:
Response.Write "<td>"

Response.Write "<select size=""1"" name=""filterVal"" onChange=""filterPage(this)"">"
  Response.Write"<option value=0>Show All Count Types</option>"
  Response.Write"<option value=-1 "
     if request("filterVal") = "-1" then response.write "selected" end if
	response.write ">Show All Unassigned</option>"
	  for x = 0 to ubound(countType, 2)
	    Response.Write"<option value =" & countType(0,x)
		if cstr(countType(0,x)) = request("filterVal") then
		  Response.Write " selected"
		end if
	    Response.Write ">" & countType(1,x)  & "</option>"
           Next
Response.Write "</select>"

Response.Write "</td>"

And a SECOND one that IS NOT working; this one only has a name[0]:
Code:
Response.Write "<td>"

Response.Write "<select size=""1"" name=""blockFilterVal"" onChange=""filterPage(this)"">"
  Response.Write"<option value=0>Show All Blocks</option>"
     for x = 0 to ubound(blocks, 2)
	Response.Write"<option value =" & blocks(0,x)
	   if cstr(blocks(0,x)) = request("blockFilterVal") then
	     Response.Write " selected"
	   end if
	Response.Write ">" & blocks(0,x) & "</option>"
     Next
Response.Write "</select>"

Response.Write "</td>"

And my JS:
Code:
function filterPage(itm){
  document.forms[0].action="assignCountTypes.asp";
  document.forms[0].submit();
}


So, I guess I need to know:
1. What's wrong w/ my second select box that it isn't working
and
2. Once the second select box is working, how to get the two of them to work in conjunction (or maybe, once I get the second on working, it automatically will??)


Thanks much!
-jiggyg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top