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

looping using array

Status
Not open for further replies.

riffy

Programmer
Mar 29, 2001
106
US
Hi all,

I have a page that has 5 lamp categories. Clicking on any of them will populate a drop-down with their respective bulb types. Now when the user clicks on one of the bulbs in the drop down, it brings up a page that displays the bulb images. Suppose one of the bulb types in the drop down is A-19. When the user selects that and clicks the submit button, the resulting page will display all the different A-19 bulbs.

What would be the best way to go about bringing up the results page? I have the script that populates the drop-down but I'm not sure on how to display the images.

If anyone has any idea, please let me know.

Thanks
Arif
 
what i forgot to add was that the different bulb types are located within in array, so my main question is basically how do i loop thru the array containing the bulbs

the following is the array containing the bulbs:
Code:
bulb = new Array(6);
bulb[0] = new Array("");
bulb[1] = new Array("Show All","A-15","A-19","A-21","A-23","A-25","B-10 1/2","BA-9","BA-9 1/2","BR-19","BR-25","BR-30","BR-38","BR-40","C-7","ER-30","ER-40","F-10","F-15","F-20","G-16 1/2","G-25","G-30","G-40","K-19","P-25","PAR-36","PAR-38","PAR-46","PAR-56","PAR-64","PS-25","PS-30","PS-35","PS-40","PS-52","R-14","R-20","R-40","R-52","S-6","S-11","S-14","T-4 1/2","T-6","T-6 1/2","T-7","T-8","T-10","T-14");
bulb[2] = new Array("Show All","EL/A","EL/O","EL/T","EL/Twist","FC8T9","PL-C","PL-L","PL-S","PL-T","SLS","SLS/G30","SLS/G40","SLS/R30","SLS/R40");
bulb[3] = new Array("Show All","T5","T8","T8 U-Bent","T9","T12","T12 U-Bent");
bulb[4] = new Array("Show All","A-23","BT-37","BT-46","BT-56","E-23","E-25","E-28","ED-17","ED-17P","ED-18","ED-23 1/2","ED-28","ED-37","PAR-20","PAR-30L","PAR-38","R-40","R-57","R-60","Special","T-4","T-6","T-10","T-14","T-15","T-17","T-21","TD-6","TD-7");
bulb[5] = new Array("Show All","37mmALR","56mmALR","BT-15","CP-19","DiOptic Reflector","F-10 1/2","F-15","MR-16","MRC-11","MRC-16","PAR-16","PAR-20","PAR-30L","PAR-30S","PAR-30S DiOptic Reflector","PAR-38","PAR-38 DiOptic Reflector","PAR-38 Standard Reflector","PAR-56","PAR-64","R30","T-3","T-4","T-5","T-6");

thanks again
arif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top