JavaScript.CoolDev.Com Support Forums
Any questions related to JavaScript menu and JavaScript tree menu by Javascript.CoolDev.Com
| Author |
Message |
shockr Guest
|
Posted: Thu Feb 12, 2004 3:51 pm Post subject: Opening new window? |
|
|
Is there a way to have the pages in the CooljsTreePro
node links open in a new (pop-up) window?
This doesn't work:
['Modifications', "window.open('showRepos?cid=26')", null]
Thanks,
John |
|
| Back to top |
|
 |
AlexKunin Developer
Joined: 03 Jan 2003 Posts: 1191
|
Posted: Fri Feb 13, 2004 5:56 am Post subject: |
|
|
Like this:
| Code: | | ['Modifications', "javascript:window.open('showRepos?cid=26', '_blank', 'width=400,height=300')", null] |
Or like this:
| Code: | | ['Modifications', "showRepos?cid=26", '_blank'] |
|
|
| Back to top |
|
 |
shockrj Guest
|
Posted: Wed Feb 18, 2004 3:34 pm Post subject: Re: Opening new window? |
|
|
Thanks, Alex.
The first method works as desired but also opens up a blank window the same size as the parent with a URL of the javascript call. Is there a way to eliminate the blank window? I've fiddled with the CoolTree target parameter and with the javascript target parameter without any luck.
First method -> sized pop-up, parent-sized blank window, parent window
The second method works without the blank window, but the pop-up is the same size as the parent (I need smaller).
Second method -> parent-sized pop-up, parent window
Both methods behave the same in IE 6.0 and Mozilla 1.2.1 |
|
| Back to top |
|
 |
mniedringhaus Guest
|
Posted: Thu Feb 26, 2004 4:30 pm Post subject: Open new window |
|
|
| Alex, I'm having the same problem as Shockrj. Is there a way for the new window to open without the former window changing to the url of the javascript call? Doesn't it need a "return" statement? |
|
| Back to top |
|
 |
mniedringhaus Guest
|
Posted: Thu Feb 26, 2004 6:05 pm Post subject: |
|
|
I found a solution:
| Code: | | ['Modifications', "javascript:void(window.open('showRepos?cid=26', 'popup', 'width=700,height=430, toolbar=yes, menubar=yes, resizable, scrollbars=yes'))", null] |
The inspiration came from a post in CoolMenu forum.
Thanks to you both for starting the discussion. |
|
| Back to top |
|
 |
|
|