I need menu position to change for one menu item,link inside

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
aquaverse
Advanced
Advanced
Posts: 22
Joined: Fri Feb 11, 2005 9:40 pm

I need menu position to change for one menu item,link inside

Post by aquaverse »

Hello everyone.

Please see http://www.icruise.com and rollover the "myicruise" ban item on the top right. Notice the menu is opening to the right and extending outside of the design area. Is there a way to force the menu to stay at that same width (150 pixels), but expand to the left instead of to the right?

Also, fixed popup windows don't seem to be working for me in Firefox. Can anyone give me code to put into my menu_data file, so that those windows open in a fixed-sized window in Firefox?

Thanks in advance.

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

Post by Ruth »

Hi A,

Have you tried using the left="offset=-20px"; or whatever works? However, you need to realize that this will change the position of that submenu depending on resolution. For example, I am at 800x600, the menu opens to the left not the right. So, if you set that offset to a negative, it should move it left, but in my resolution, since it already opens left it will move it 20px more to the left, or whatever number you use.

There is another post from a long while ago that has to do with finding the position of a main horizontal item and setting the position of the vertical menu that came off that item. You might take a look here

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

Post by Ruth »

aquaverse wrote:Also, fixed popup windows don't seem to be working for me in Firefox. Can anyone give me code to put into my menu_data file, so that those windows open in a fixed-sized window in Firefox?
Yes, I can, but I don't know javascript, so I don't know how to make the function so you can change the size for each window. You'd have to make the same number of functions for the number of windows you want to open. I'm sure there's a way to do it so that you can change the size for each link you want to open in a new window, but I don't know how. If you place this at the top of the menu data file:

Code: Select all

var newwindow;
function mywindow(url)
{
	newwindow=window.open(url,'name','height=440,width=415,scrollbars=no');
	
}
then in the aI string for that window you'd code this

Code: Select all

aI("text=Mainstream Lines;url=javascript:mywindow('http://www.icruise.com/mainpop.htm');"); 
As you can see, if you used that in each one they would all be that 415x440. You can 'repeat the var, just putting a number,

Code: Select all

var newwindow;
function mywindow1(url)
{
	newwindow=window.open(url,'name','height=520,width=418,scrollbars=no');
	
}
and in the aI it would be

Code: Select all

aI("text=Adventure finder;url=javascript:mywindow1('http://www.icruise.com/adventure_cruise_finder.htm');"); 
As you can see, doing it that way you'd have to have a different function for each window. I'm sure there is a way to do it with only one function, but I don't know how. And I don't think you want to have to put in x number new window functions. Perhaps someone else will know how to make it into just one function that you can put in variable window sizes.

The good news is, it does work in Firefox.

Ruth
aquaverse
Advanced
Advanced
Posts: 22
Joined: Fri Feb 11, 2005 9:40 pm

Post by aquaverse »

Thank you very much Ruth. I will look into this right now. :)
aquaverse
Advanced
Advanced
Posts: 22
Joined: Fri Feb 11, 2005 9:40 pm

Post by aquaverse »

The popups now work in Firefox! Thanks again!

The other suggestion for the menu position worked as well!

I'm very appreciative.
Post Reply