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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multi-column List Box

Status
Not open for further replies.
Feb 9, 2007
46
0
0
US
Hi,

This small example uses Northwind database to show the 2 sets of data in the select box - CategoryID, CategoryName.

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 TRANSITIONAL//EN" "[URL unfurl="true"]HTTP://W3.ORG/TR/HTML4/LOOSE.DTD">[/URL]
<HTML>
<HEAD>
<SCRIPT>
</SCRIPT>
</HEAD>
<TITLE>Multi-column ListBox</TITLE>



<body onLoad="attachSmartSelect();">
<form name="form1" method="get" action="">
<select name="data" id="data">
	<option value=-1>Select Category</option>
	
		<option value="1">1&nbsp;|&nbsp;Beverages</option>
	
		<option value="2">2&nbsp;|&nbsp;Condiments</option>
	
		<option value="3">3&nbsp;|&nbsp;Confections</option>
	
		<option value="4">4&nbsp;|&nbsp;Dairy Products</option>
	
		<option value="5">5&nbsp;|&nbsp;Grains/Cereals</option>
	
		<option value="6">6&nbsp;|&nbsp;Meat/Poultry</option>
	
		<option value="7">7&nbsp;|&nbsp;Produce</option>
	
		<option value="8">8&nbsp;|&nbsp;Seafood</option>
	
</select>


</BODY>
</HTML>

My question is, how can I seperate the two to make it look more like 2 columns side by side? Do I dump the VBScript array into the Javascript array? Do I build the select control using the Javascript array? How can I go about doing this?

Thanks.
 
What do you mean. Explain better, of what you want your results to look like. You example is one drop down box with the text "1 | Beverages".

What are you wanting?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top