- Create Account

Question about pop-up window ...

Forums > Cascading Popup Menus: Help > Question about pop-up window ...
Author
Message

1) PHCO Group: Members
Posts: 2 Joined: 17 Dec 2005 Location: Austria IP: 212.186.--.--
Hallo Angus,

first of all. Thank you very much for your excellent work. Much appreciated!

I have following two questions:

# Question1:
----------------
I have two items in your popup menu which should open new windows with specific width, length and other parameters. I get it to work for Mozilla Firefox, but not for Internet Explorer. Where is my fault?

// Item Nr.1
addItem('About', 'window.open("about.html", "About  TAR","width=480,height=520,hotkeys=no,location=no,menubar=no,resizable =no,scrollbars=no,status=no,toolbar=no")', 'js:', null, 43);

// Item Nr.2
addItem('  Multiplayer', 'window.open("multiplayer.html", "TAR Multiplayer Information", "width=480,height=480,hotkeys=no,location=no, menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no")', 'js:', null);

# Question 2:
-----------------
I want to center my root menu. That is why I have used your comment:

startMenu('root', false, 'window.page.winW()/2 - menuW/2',130, 20, hBar);

This does work perfectly for Internet Explorer but not for Mozilla Firefox. There, the menu moves to the right when resizing the browser-window.Looks not nice. Do you have any idea how I can arrange this for Mozilla Firefox?

Thank you very much ...

Christmas  Greetings

Florian

2) Angus Turnbull Group: Moderators
Posts: 4042 Joined: 7 Dec 2003 Location: New Zealand IP: 219.88.--.--
1) Check if the FF popup blocker is eating the menu popup. It shouldn't, but I don't know your exact config. Also, I wouldn't have spaced in the window name, try changing "TAR MultiPlayer Information" to "tarmulti" or similar, or just leave it blank -- you only need to name windows like that if you want all your links to open in the same window, which isn't a good idea for general navigation options. In fact, why not just use regular links, and let users open them up in new windows if they want by themselves?

2) This has come up a LOT in the forums, try browsing through several pages or searching on "position" or "center" or something. FF, Opera etc don't subtract the scrollbar amount from the page width, so they're slightly offset right. In short, you can try:


startMenu('root',  false, 'window.page.winW()/2 - menuW/2 - ((isIE&&!isOp) ? 0  : 8)',130, 20, hBar);

to approximate it.

Good luck - Angus.

3) PHCO Group: Members
Posts: 2 Joined: 17 Dec 2005 Location: Austria IP: 212.186.--.--
Thank you very much for your reply Angus. You have already solved problem Nr.1. It seems that IE doesn't like the blanks in the window name. :)

I  am still trying to get problem Nr. 2 solved. Maybe I am wrong, but I think my problem is not the one, you are talking about. Probably I have badly explained it. *Sorry* I also get a slight offset to the right in Firefox, but I don't really care. I am talking of following: My menu is " approx. centered" in Firefox at my window-size of 1280px, but if I try to resize the window (reducing), then the menu doesn't stay approx. centered, but moves completely to the right. Do you have any idea?

Thanks again and once again MERRY CHRISTMAS (you have much better weather now than we have) ;)

Florian

4) Sav Group: Members
Posts: 8 Joined: 14 May 2007 Location: Kent IP: 80.88.--.--
Glad I found this post and thx to the poster.

After hours of puzzling where the new window size control error came from, it's the spaces in the window name,

Grrrrr  IE7

Sav

Post a Reply:

You are not logged in, and will be posting anonymously as a guest. If you want to post using an account, please login at the top of this page.