View Full Version : Images in JavaScript dropdown menus?
Violet
01-05-2001, 08:05 PM
Hi all,
This is part of the code for a drop down menu I'm using in a website:
AddSubMenu(6);
AddMenuItem("Information","/bench.asp?dancenet=on","black","bench");
AddMenuItem("Contact","/bench.asp?dancenet=off","black","bench");
There's more but you'll get the idea <g>.
Now I want to include a tiny gif-image in front of each menu-word, in this case:
<gif> Information
<gif> Contact
How do I get these gifs into the code for the menu? Tried several things, fi including this line before the "Information"-bit:
<IMG SRC="d:\Homepages\CCS\button.gif">
Needless to say it didn't work.
Hopefully someone can help me out!
Thanks all,
Violet:-)
whkoh
01-05-2001, 10:11 PM
Can you please specify the site so that we can try to help you out?
------------------
Koh Wei Han
Network Engineer
Contact: whkoh@apexmail.com , whkoh@mailandnews.com , whkoh@020.co.uk
Hi, it is hard to say without seeing more of the script. Try:
AddSubMenu(6);
AddMenuItem("<img src='http://yourimagesource.gif' width='10' height='10'>", "Information","/bench.asp?dancenet=on","black","bench");
This is a complete stab in the dark, I presume this script uses .js files to set its functioning, layout and positioning, one of these will more than likely need to be edited to include the extra field. However it is worth a shot to see if you have a better result than what you had before :).
------------------
Ian
Web Development - BIG Resources Inc
Head Guide - 123Webmaster.com (http://www.123webmaster.com/)
ian@123webmaster.com
BIG Resources.com (http://www.bigresources.com)
ICQ: 25828668
Violet
01-05-2001, 10:41 PM
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by whkoh:
Can you please specify the site so that we can try to help you out?
<HR></BLOCKQUOTE>
I wish I could, but unfortunately the site is not online. I'll try to get it online asap, and let you know what the URL is.
Thanks!
Violet:-)
Violet
01-05-2001, 10:50 PM
Hi Ian,
Thanks for your reply! Although it didn't work out .... my bad, you didn't have a lot of information to work with ;-)
No doubt you guessed I'm new to JavaScript! I think I'll have to move past copying scripts from sites. First thing to do tomorrow: get a decent JavaScript-book. Did some PASCAL-programming in the ancient times, so I'm sure I'll get the hang of it <lol>.
But again thanks for your reply, I did learn a few things from it!
If you don't mind, I'd like to get back to you later with this question.
TTFN
Violet:-)
hi, well it was worth a shot huh, can you post all of the script you have, or post the url to the site you obtained it from, hopefully we may be able to view it and see whats what :)
Thanks.
------------------
Ian
Web Development - BIG Resources Inc
Head Guide - 123Webmaster.com (http://www.123webmaster.com/)
ian@123webmaster.com
BIG Resources.com (http://www.bigresources.com)
ICQ: 25828668
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.