Reply
How to open child window from another child window
Old 04-13-2007, 09: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
 
 
When You Register, These Ads Go Away!
Old 04-13-2007, 04:11 PM Re: How to open child window from another child window
tripy's Avatar
Do not try this at home!

Posts: 3,434
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 04:12 PM..
tripy is online now
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.09917 seconds with 13 queries