Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
How to open child window from another child window
Old 04-13-2007, 10:59 AM How to open child window from another child window
Novice Talker

Posts: 10
Trades: 0
Hi,

I have a java script function like this to open one child window form main window. Its working properly.

function billingMain() {
top.consoleRef=window.open('#{facesContext.externa lContext.requestContextPath}/main/billing/billingMain.jsf','window1',
'width=950,height=400'
+',menubar=0'
+',toolbar=0'
+',status=0'
+',scrollbars=1'
+',resizable=0'
+',location=0')
top.consoleRef.document.close()
}

But when my child window opened, i want to open another child window from previous child window.

and here is the script follows for this,

function UB92Main() {
top.consoleRef=window.open('#{facesContext.externa lContext.requestContextPath}/main/billing/claimInformation.jsf','UB92',
'width=450,height=250'
+',menubar=0'
+',toolbar=0'
+',status=0'
+',scrollbars=1'
+',resizable=0'
+',location=0')
top.consoleRef.document.close()
}

here the second child window is not opening.
How to resolve this.

Thanks,
Vinutha.
vinutha is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-13-2007, 05:11 PM Re: How to open child window from another child window
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
In your popup, try to send the request to top.opener.top rather than top.
Code:
top.opener.top.consoleRef=window.open('#{facesContext.externa  lContext.requestContextPath}/main/billing/claimInformation.jsf','UB92',
                  'width=450,height=250'
                   +',menubar=0'
                   +',toolbar=0'
                   +',status=0'
                   +',scrollbars=1'
                   +',resizable=0'
                   +',location=0')
                   top.consoleRef.document.close()
                }
the first top.opener should allow the function call to get back to the top of the parent (opener) windows, and then call this function from the parent window.

I didn't tried it, don't know how an anti-popup will react neither.
I know they tend to block request when they don't come drectly from a user interaction. And here, it obliviously won't be a direct user action that will open the second popup.

What you could do, is open both at the same time, and move one out of the screen boundaries, and put it back in the screen whan needed though...
__________________
Only a biker knows why a dog sticks his head out the window.

Last edited by tripy; 04-13-2007 at 05:12 PM..
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Reply     « Reply to How to open child window from another child window
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.10070 seconds with 12 queries