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

targetfeatures ? Position


Poster: Armin
Dated: Sunday December 5 2004 - 22:31:42 GMT

How can I target the position of a new window?

Where can I let the new window know where to "popup" ??

Thanks a lot for your help - Armin

aI("text=Musik;url=../se/music-se/popup-se.html;align=right; showmenu=Musik;image=../se/images-se/music/music-se.gif;itemwidth=14%;target=Musik;targetfeatures=width=200 height=150 toolbar=no location=no directories=no status=no menubar=no scrollbars=no resizable=no copyhistory=no;");


Poster: Ruth
Dated: Sunday December 5 2004 - 23:19:15 GMT

When placing code, please use the code button to open and close it.

You can position the window using the targetfeature.
Code:
targetfeatures=all the stuff you have plus  left=10 top=10  or whatever placement you want;");

However you need to be aware of a couple of things. This will not work in all browsers because they don't all support it. Also, if the window is already open and it gets the new page gets loaded in it, it will not position differently from where it already is.

Ruth

Thanks


Poster: Armin
Dated: Tuesday December 7 2004 - 20:05:54 GMT

Hi ruth,

Tnanks for your help. Like you have written it work in IE but not in Firework or Netscape.

Thanks - Armin


Poster: Ruth
Dated: Friday December 10 2004 - 11:56:36 GMT

I think you need a function. I saw this and don't know if it will do what you want.
Code:
var newwindow;
function poptastic(url)
{
   newwindow=window.open(url,'name','height=500,width=400,left=100,
  top=100,resizable=yes,scrollbars=yes,toolbar=yes,status=yes');

}


As to what you do with that function, where you put it, etc. I'm not sure. I think you put it in between the head tags and then in the menu link you'd call it, I think like this
Code:
aI("text=item;url=javascript:newwindow('http://whatever/');");
Hopefully you can do something with this.

Ruth


Poster: Ruth
Dated: Friday December 10 2004 - 12:20:12 GMT

:oops: This is incorrect
Code:
aI("text=item;url=javascript:newwindow('http://whatever/');");


It should be
Code:
aI("text=item;url=javascript:poptastic('http://whatever/');");


Sorry. It does work in Netscape.

Ruth

but the menu doesn't auto hide


Poster: greengrass
Dated: Sunday December 26 2004 - 16:22:07 GMT

I use similar code to pop up a small dislogue box from a sub-menu item .
I get the pop to display correctly, but the menu/sub-menu/sub-menu item display
doesn't auto-hide.in the mail/original window!

Thoughts?

ps: I'm running the latest Milonic download in Foxfire 1.0


Poster: kevin3442
Dated: Sunday December 26 2004 - 19:14:52 GMT

Hi Armin,

Armin wrote:
Like you have written it work in IE but not in Firework or Netscape.

Like Ruth mentioned, not all attributes are supported by all browsers. At least some versions of Netscape do not support the left= and top= window attributes in the window.open() method. So, it won't work with those.


Hi Greengrass,

greengrass wrote:
I get the pop to display correctly, but the menu/sub-menu/sub-menu item display doesn't auto-hide in the mail/original window!

Try adding closeAllMenus(); to the top of the function you use to open your popup window.

Cheers,

Kevin


Poster: greengrass
Dated: Sunday December 26 2004 - 20:46:41 GMT

Kevin:

Thanks for the prompt response. closeAllMenus() worked perfectly.
This thread might be usefully incorporated into the FAQ (IMOSHO)

regards