PDA

View Full Version : How to open child window from another child window


vinutha
04-13-2007, 10:01 AM
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.

erisco
04-13-2007, 11:15 AM
Well, this is just a stab in the dark, but both referenced top.consoleRef.document.close() which to me doesn't make sense... the windows have different names don't they? Perhaps it should be top.window1.document.close() or similar...

shot in the dark.