PDA

View Full Version : Adding to a dropdown menu script



ergibbs
09-04-2011, 05:59 PM
1) Script Title: Drop down menu w/ description

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/combodescribe.htm

3) Is there a way to modify this script to include a particular image when an option is selected? If option1 is selected, image1 appears with text1, if option2 is selected, image2 appears with text2, etc.


Thanks

jscheuer1
09-05-2011, 04:49 PM
Make this part like so:


//1) CUSTOMIZE TEXT DESCRIPTIONS FOR LINKS ABOVE
var thetext1=new Array()
thetext1[0]='Comprehensive JavaScript tutorials and over 400+ free scripts<img src="whatever.gif" alt="original image" title="">'
thetext1[1]='Direct link to hundreds of free Java applets online!<img src="another.gif" alt="original image" title="">'
thetext1[2]='Up to date news on the technology front<img src="yet_another.gif" alt="original image" title="">'
thetext1[3]='News.com- The #1 technology News site.<img src="still_another.gif" alt="original image" title="">'
thetext1[4]='Web Coding and development forums<img src="guess_which.gif" alt="original image" title="">'

Note: The outermost quotes have been changed from double (") to single (') to allow for the double quotes inside the img tags.