Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

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:06

target & targetfeatures support between different browse


Poster: rav4ski
Dated: Monday October 18 2004 - 14:45:08 BST

Hi,

I am not sure whether this is a browser (javascript) or it's an issue of the menu.

Please check the following,

http://www.cojava.com/jsMenu/popup/menu.htm
(The script is downloaded from "menu_sample11_ver5_51". I only modify
the menu_data.js to do the test.

You can mouse over to the menu item "Test - Opened in New window".

Click on each one of them and see what happened?

I tested them in IE6.0, it will resize if the popup window is closed.

For the NS 7.1, it pops up different size of window than IE. Also, the NS 7.1
just can't take any size feature correctly. The size of popups are all wrong.

For the FireFox PR 1.0, it just crashes the browser all the time.

Is it a fully tested feature? How can it be so complicated for a popup?

Or I should just other javascript to open the target?

(I believe my company is in the process of buying this menu with Milonic based on my recommendation. I hope I can have a fix or answer before my boss chase me down... ) :roll:

Thanks,

Jason

Re: target & targetfeatures support between different br


Poster: kevin3442
Dated: Monday October 18 2004 - 18:26:50 BST

Hi Jason,
rav4ski wrote:
I am not sure whether this is a browser (javascript) or it's an issue of the menu.

I think it's probably a combination of browser differences, plus what you're trying to do.

Quote:
Please check the following, http://www.cojava.com/jsMenu/popup/menu.htm You can mouse over to the menu item "Test - Opened in New window". Click on each one of them and see what happened? I tested them in IE6.0, it will resize if the popup window is closed.

The menu code uses the js method called window.open() to open a new window. If the named window (passed in the menu's target property) is not open already, the function opens a new one with the specified name and specified properties (passed in the menu's targetfeatures property). If the specified window is already open, then the window,open() method will load the specified url, but will not change the window properties. In other words, once the window is open, it remains open where it is and how big it is; the window.open() method does not resize or reposition a window (there are other js methods of the window object for doing those things: window.resizeTo(), window.resizeBy(), window.moveTo(), window.moveBy(), etc. ). So, the upshot is that this observation:
Quote:
...it will resize if the popup window is closed.

is the expected behavior.

Quote:
For the NS 7.1, it pops up different size of window than IE. Also, the NS 7.1 just can't take any size feature correctly. The size of popups are all wrong. For the FireFox PR 1.0, it just crashes the browser all the time.

I'm going to guess that at least part of the problem is that some of the targetfeatures you've used are not supported by all of the browsers that you mention. For example, I see that you use left= and top= in the targetfeatures, but as far as I know, these are IE4+ features and are not supported in NS7.1. I also notice that you pass resize=1 as well as resizable=1, but as far as I know, there is no window attribute called resize (the property is resizable). So, it could be that the presence of unsupported or unrecognized window properties in your targetfeatures string is causing the browser to choke.

Quote:
Is it a fully tested feature?

I would have to guess that it's as fully tested as any feature can be across browsers.

Quote:
How can it be so complicated for a popup?

Well... as you can see from the above discussion, it can be complicated, especially across browsers. This is probably why some of the window attributes you've tried to use are not mentioned in sample11. The ones lited in the sample may be the only ones that can be relied upon to behave consistently across different browsers.

Quote:
Or I should just other javascript to open the target?

This isn't a bad idea (it's how I would do it, if that matters). WIth your own function wrapping the capabilities of the window.open() method, you can have finer control over what happens, including specifying different behaviors for different browsers. If you do a search in the v5 Help Forum for 'targetfeatures' you will find more discussion about these issues, as well as examples of functions you can use to open windows yourself. You also might find this list of window attributes that are available to window.open() useful.

Hope that helps,

Kevin

targetfeatures is very buggy in non_IE env


Poster: rav4ski
Dated: Tuesday October 19 2004 - 16:19:08 BST

I am certain about the bug now. Where can I report it?

Check on my example again. http://www.cojava.com/jsMenu/popup/menu.htm

I move the menu data into the menu.htm so I can see the src easily from the browser. (It shouldn't matter where they are, though.)

As you can see, even if I use only width and height, it still won't work in NS7.1.

So I put my own simple openPopup javascritp in the menu_data.js and try it by doing the following,
Code:
aI("text=windowName2...;clickfunction=openPopup('http://www.google.com','windowName2',600,200,0,0,1,1);");


Guess what? It works for IE6.0, NS7.1 and FireFox 1.0 PR. It won't crash my browser, either. :o


Quote:
This is probably why some of the window attributes you've tried to use are not mentioned in sample11. The ones lited in the sample may be the only ones that can be relied upon to behave consistently across different browsers.


That leads me back to my question. Should this be as simple as the openPopup function I use to fix the "target & targetfeatures" in milonic menu? If it can't even support NS7.1 for the simple open window with a new height and width every time, then the so-called "cross-browser" support does not apply here.

It is a bug without doubt. To me, I can use my own javascript to work around with it. However, I don't have the resources to test all the other OS and browsers. I hope this can be fixed in the next release.

Thanks,

Jason

still no response from Milonic team...


Poster: rav4ski
Dated: Thursday October 28 2004 - 14:44:15 BST

My deadline is tomorrow (10/29/2004).

Even if I am still waiting for the license from our purchasing department, I have to wrap up the codes. (implementation)

I guess I have to use the "home-cooked" java script window opener for now.
:cry: