IMAGE menu property - can't get it to work

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
tepidarium
Mega User
Mega User
Posts: 169
Joined: Sun Oct 05, 2003 4:21 am

IMAGE menu property - can't get it to work

Post by tepidarium »

Hi All,

I am trying to get the image menu item property to function, but the image is not showing up. the code snippet is:

Code: Select all

with(milonic=new menuname("history")){
style=menuStyle;
aI("text=We Built New York;url=http://library.citytech.cuny.edu/webuiltny/;target=_blank; image=/images/arrow2.gif;");
}
The associated url is:
http://www.citytech.cuny.edu/menutest/menu.html

The image should appear under the following submenu:

About Us> Heratige & History > (image) We Built NY


Any ideas?

Thanks :D
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Check the path to the image. And, also put a ; after the image code. image=whateverpath/arrow2.gif;");
tepidarium
Mega User
Mega User
Posts: 169
Joined: Sun Oct 05, 2003 4:21 am

Post by tepidarium »

Ruth wrote:Check the path to the image. And, also put a ; after the image code. image=whateverpath/arrow2.gif;");
Hi,

The path to the image is correct. I have tried both styles, i.e. "/images/arrow2.gif" and
"http://www.citytech.cuny.edu/images/arrow2.gif"

neither work.

At first I did use the closing ";" but then I went to the main Milonic site and saw that for the image tag, milonic's main site menu does not use the ";" at the end so I took mine out.
My could does not work with the ";" present or absent".

I cannot figure out what is wrong.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

You've got a space in there after target=_blank;. Drops the rest of the line, so it never read image=. See http://www.west.asu.edu/sa/testsite/cuny/.

For some reason I can't get imagealign=right; to work. I'll leave that up to you for the space thing! :D
John
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Unless there has been a change, then the way to get the image to the right of the text is to use html img tags to place the image in the menu item. http://milonic.com/forum/viewtopic.php?t=3995 Has more info. I also found that I had to declare an itemwidth when using the html coding in a particular menu or the image wrapped in ie5.5 win98

Ruth
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Good, Ruth, thanks. I forgot about that little snafu.
John
tepidarium
Mega User
Mega User
Posts: 169
Joined: Sun Oct 05, 2003 4:21 am

Post by tepidarium »

I'm going to take a look at this tomorrow. Thanks Ruth& John for your help. I'll report back here :D
tepidarium
Mega User
Mega User
Posts: 169
Joined: Sun Oct 05, 2003 4:21 am

Post by tepidarium »

Ruth wrote:Unless there has been a change, then the way to get the image to the right of the text is to use html img tags to place the image in the menu item. http://milonic.com/forum/viewtopic.php?t=3995 Has more info. I also found that I had to declare an itemwidth when using the html coding in a particular menu or the image wrapped in ie5.5 win98

Ruth
Ruth can you elaoborate on your "itemwidth" statement. Do you mean the width of the image in html in the <img> tag, or do you mean declaring an itemwidth for the menu item?

If it's for the menu item I'm not sure what you mean, can you provide a small code example?

Thank you :D
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

It's the menu itemwidth. For example:

Code: Select all

aI("text=<img src=imageName.gif border=0 align=right>Item Text;url=whatever.htm;");
If you just code it that way, the image sits to the right of the text but sits right on top of it, rather than moving to the end of the item, or in some cases it 'wraps'. That's what it does in my ie5.5 and win98. So, adding an itemwidth resolves those issues.

Code: Select all

aI("text=<img src=imageName.gif border=0 align=right>Item Text;url=whatever.htm;itemwidth=150;");
As you see the itemwidth is coding right in that particular aI string, not for the whole menu. Though perhaps if you have itemwidth coded for the menu that would also resolve the issue. I didn't try that. :)

Ruth
tepidarium
Mega User
Mega User
Posts: 169
Joined: Sun Oct 05, 2003 4:21 am

Post by tepidarium »

Ruth wrote: As you see the itemwidth is coding right in that particular aI string, not for the whole menu. Though perhaps if you have itemwidth coded for the menu that would also resolve the issue. I didn't try that. :)

Ruth

Hi Ruth,

Thanks, I think I understand now...although if one sets the itemwidth at a certain figure, if other items are not as long as this item it will stretch the whole menu, no?

Anyhow, I've implemented the code with the image= option and it's alright. I'm not sure that I need the image on the right but it's good to know how to do it :-)
Thank you!
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

If you put the itemwidth in the particular aI string then no, it will only make that item the width listed, and not affect the other items.

Ruth
Post Reply