JavaScript.CoolDev.Com Support Forums

Any questions related to JavaScript menu and JavaScript tree menu by Javascript.CoolDev.Com

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Opening new window?

 
Post new topic   Reply to topic    JavaScript.CoolDev.Com Forum Index -> COOLjsTree
Author Message
shockr
Guest





PostPosted: Thu Feb 12, 2004 3:51 pm    Post subject: Opening new window? Reply with quote

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

PostPosted: Fri Feb 13, 2004 5:56 am    Post subject: Reply with quote

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





PostPosted: Wed Feb 18, 2004 3:34 pm    Post subject: Re: Opening new window? Reply with quote

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





PostPosted: Thu Feb 26, 2004 4:30 pm    Post subject: Open new window Reply with quote

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





PostPosted: Thu Feb 26, 2004 6:05 pm    Post subject: Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    JavaScript.CoolDev.Com Forum Index -> COOLjsTree All times are GMT
Page 1 of 1