Having popup window difficulties - fixed sized popups...

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

Having popup window difficulties - fixed sized popups...

Post by aquaverse »

I have implemented my menus and all is well except for one thing. Here's the site: http://www.icruise.com/. Here's the menu_data source code for opening these fixed sized windows:

Code: Select all

aI("text=Mainstream Lines;url=http://www.icruise.com/mainpop.htm;target=_blank;targetfeatures=scrollbars=no=width=415=height=440;"); 
The windows come up correctly in IE and Netscape, but are not fixed in Firefox. Can anyone help me correct the code?

Thanks in advance,

Geoff
icruise.com

Update: I used the information on this page to create the popup and it resulted in opening a different sized popup window in Firefox.
http://milonic.com/menusample11.php
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Try...

Code: Select all

aI("text=Mainstream Lines;url=http://www.icruise.com/mainpop.htm;target=_blank;targetfeatures=scrollbars=no width=415 height=440;");
John
aquaverse
Advanced
Advanced
Posts: 22
Joined: Fri Feb 11, 2005 9:40 pm

Post by aquaverse »

John wrote:Try...

Code: Select all

aI("text=Mainstream Lines;url=http://www.icruise.com/mainpop.htm;target=_blank;targetfeatures=scrollbars=no width=415 height=440;");
Same result. :(

http://dev.icruise.com:10222/resEntry.j ... te=4/10/05

Under Cruise Categories, top link is your new one. Second link is my original. Any other suggestions to fix the window size in Firefox?

Thank you for looking into this...
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Your menu code placement is incorrect for using the menu inside a td. See http://milonic.com/tablemenu.php for instructions.
John
aquaverse
Advanced
Advanced
Posts: 22
Joined: Fri Feb 11, 2005 9:40 pm

Post by aquaverse »

Thanks for pointing that out, John.

I fixed that issue on this page:
http://dev.icruise.com:10222/search.jsp ... range=5000

However, the fixed-sized popup problem in Firefox still persists. Any other suggestions, or am I stuck with it this way?

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

Post by aquaverse »

Also:

When I use the proper table structure for the menus as presented in the link above, my menus become noticeably slower. My boss wanted to use these menus because they are so fast, so this is yet another problem. :( Menus seem to work with incorrect syntax, though, so I may keep as is for now.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Is there a particular reason you have the menu in a table? From the layout it looks like you could set it up as absolute positioned?

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

Post by aquaverse »

Yes, in another thread I mentioned that we have affiliates who add their own html to the tops of our pages, so depending on what their code is, the menus get pushed around. Thus, relative positioning.
Ruth wrote:Is there a particular reason you have the menu in a table? From the layout it looks like you could set it up as absolute positioned?

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

Post by Ruth »

Hi,
Sorry, I didn't know about that issue. Do you have a page with the correct layout so we can see why the menu is slow? Putting it in a table shouldn't change how fast it is, it's the same amount of data. And, putting all the calls for the menu in one table cell can cause problems in some browsers.

Ruth
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi Geoff,

Hmmm... the syntax for the targetfeatures property is shown in sample11 the way John suggested you try it. But that apparently doesn't work. It's as if only the first attribute in the sequence is having any effect. So, I tried something else. It may seem odd, so let me explain why I tried it.

The menu's targetfeatures property essentially passes the specified values to the optional features (or attributes) parameter of javascript's native window.open() method. In the window.open() method, the features parameter is a comma-separated list of window attributes passed in a string. Since you would normally use a comma-separated list when calling window.open() directly, I figured it'd be worth a shot to try a comma-separated list (rather than space separated) in the menu's targetfeatures property. It worked! In other words, you might try:

Code: Select all

aI("text=Mainstream Lines;url=http://www.icruise.com/mainpop.htm;target=newWindow;targetfeatures=width=415,height=440;");
Note the comma between with=415 and height=440.

Other things to note: (1) I also got rid of scrollbars=no because I believe "no" is the default state for scrollbars in a popup window. (2) Instead of target=_blank I used target=newWindow, just to give the window a name (in case you need to reference it later. _blank will do if you won't need to reference the open window for anything later). (3) I'm sure you know this, but it doesn't hurt to remind people... Since your window is a popup, your users may not see it if they have popups blocked.

Give the comma separation a shot and see if that works for you. If you'd rather not try it (given that it's not quite according to documentation), then you could always go with a js function to open your popup. If you don't know how, then we can show you if that's something you'd like to try.

Hope that helps,

Kevin
Post Reply