Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:03
Image and bgimage together.
Poster: devzero
Dated: Saturday November 27 2004 - 21:54:49 GMT
I have been looking around the forums for a solution to this, but could not find anything so i thought I would ask here.
I want to put an image before each tekst, and a background image on each menu item. Here is the code im using:
image="resources/images/btn_blue.gif";
bgimage="resources/images/buttonMiddleOn.gif";
When i have one or the other they show just fine, but when i use both, only the "image" shows.
------------------------------------
Also, is it possible to have a background image, a left image and a right image?
Poster: Maz
Dated: Sunday November 28 2004 - 1:13:58 GMT
I haven't played around with all the image options in a while, so I can't really answer your question.
Its probably best to test images in different positions, don't forget there may be a difference between menu item and style. I remember sometimes placing the image in the menu item.
the only other thing I can think of is text=........;type=html; placing html in text, I don't know what will happen with all the images.
Check other browsers too.
maz
Poster: devzero
Dated: Sunday November 28 2004 - 10:40:03 GMT
I tried adding "image=resources/images/buttonMiddleOn.gif;" while keeping the bgimage="resources/images/buttonMiddleOn.gif"; in the with(menuStyle=new mm_style()){ block. This made no diffrence. I am testing the menu in firefox 1.0 and explorer 6.0 (and i dont realy care if its working or not in any other browser besides those 2)
Plasing the image tag inside the Text, works, sorta. I get some padding/border/margin that i can't seem to get rid of, but i guess ill manage sooner or later:)
Poster: Maz
Dated: Monday November 29 2004 - 7:16:39 GMT
A url might be helpful, and are you sure you have the latest version of the menu?
maz
Poster: Andy
Dated: Wednesday December 1 2004 - 16:13:14 GMT
Hi,
I just tested the menu with both bgimage and image and it worked fine.
Are you sure the image locations are correct.
Cheers
Andy
Late answer...
Poster: devzero
Dated: Thursday December 2 2004 - 18:21:23 GMT
Andy:
I am very sure the image locations are correct. When I comment out like this:
//image="resources/images/btn_blue.gif";
bgimage="resources/images/buttonMiddleOn.gif";
The correct background image shows. When i use the code on top:
image="resources/images/btn_blue.gif";
bgimage="resources/images/buttonMiddleOn.gif";
Only the blue button shows.
Maz:
Ive made a test page. Im running the latest version, downloaded it the same day i made the first post in this thread.
What I want is the effect I get on the sub menu's on the main menu also.
Poster: John
Dated: Thursday December 2 2004 - 23:09:19 GMT
Actually you're quite a bit downlevel. You have 5.47 posted - current is 5.62. Try an upgrade and let us know.
Poster: devzero
Dated: Thursday December 2 2004 - 23:37:37 GMT
Must have been partialy asleep... im running 5.60 on my development machine, where i have the same problem. Apparently forgott to uppdate my production system
Anyway, I have uppdated my production and development system to 5.62 now, and still have the same problem.
Poster: Ruth
Dated: Friday December 3 2004 - 2:38:23 GMT
Quote:
is it possible to have a background image, a left image and a right image?
Yes, you can do it if you set it up as html code for the images, i.e.
Code:
aI("text=<img src=btn_blue.gif border=0 align=top>Home<img src=btn_blue.gif border=0 align=top>;
If you do it, to have space between the left image and the text you can use a non breaking line space, however you cannot use a non breaking line space and then the image on the right side. I don't know why probably something to do with the semi-colon in it, but it stops anything from showing, so you'd need to make the right side image with some blank space at the left of it.
As to the other question on the image and the bgimage. They should work. I've tested them on a number of different pages and it works, however I cannot get them to work on yours. I do not know why and since I don't know functions and such I don't know how to figure out what's causing it.
Ruth
Poster: devzero
Dated: Saturday December 4 2004 - 5:38:57 GMT
I have managed to get it to work with the HTML code for the images inserted in the Ai function. This is not an ideal way of doing it for me, as I have multiple web sites generated by the same .net code. The code for generating the Ai statement is in the compiled code, and thus needs a recompile for each chang. Plus it needs specialy inserted logic into the .cs file (since not all sites are going to use the image in the menu). The image / bgimage are in .js files and can be modified by a designer and you dont need a recompile to do it.
Also another problem, I would like to have a left and a right picture, witch are left and right aligned, and swapable by mouseover/click. This would give the opportunity to dynamiclay create 3D looking buttons.
Thanx for all your help so far.
Poster: Ruth
Dated: Saturday December 4 2004 - 16:33:47 GMT
I think you may need to contact Milonic direct as to the bgimge and image problem. I don't know about the compiled code and I think that may be causing some of the problem because I used your menu on a test page I created, putting your menu data into a data.js file and calling it and it works fine showing both the bgimage and the image. So, that indicates that something on your page is causing the problem [or perhaps in how the code is compiled].
As to the other request on the mouseover and changing I will try and see if I can figure out how to do something like that and post back here.
Ruth