DWR callback function not working when closing the child window.

View: New views
2 Messages — Rating Filter:   Alert me  

DWR callback function not working when closing the child window.

by nagabhiravas :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Can some one please help me with this issue. I am opening a child window after selecting a value making a DWR call to the server and trying to populate the values in the parent window. When i don't use/comment the window.close(), it populates the values in the parent window. But when i use window.close() nothing happens it's not even going to the callback function. The server log shows the response in both cases. DEBUG 2007-09-10 10:40:11,016 CommonsLoggingOutput:debug:43 - out(12238317): dwr.engine._remoteHandleCallback('0','0',{'F_1_1119':"15|4|4|4"})

Using Weblogic Server 7.0 SP6 and j2sdk1.4.2_13

Thank you
Srini

Re: DWR callback function not working when closing the child window.

by jt2190 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm guessing that your caller and callback functions are both in the child window. If you close the current window in the caller function, the callback function will be dereferenced before the response reaches the callback funtion. Move your caller and callback functions to the parent window, and (in IE) use <current element>.ownerDocument.window.opener.<js function> to call JS in the parent window from the child. (This might be <current element>.defaultView.window.opener.<js function> in Firefox, etc., but don't quote me on that.)

Please reply to the the list and let us know if this solved your problem.

nagabhiravas wrote:
Hi,

Can some one please help me with this issue. I am opening a child window after selecting a value making a DWR call to the server and trying to populate the values in the parent window. When i don't use/comment the window.close(), it populates the values in the parent window. But when i use window.close() nothing happens it's not even going to the callback function. The server log shows the response in both cases. DEBUG 2007-09-10 10:40:11,016 CommonsLoggingOutput:debug:43 - out(12238317): dwr.engine._remoteHandleCallback('0','0',{'F_1_1119':"15|4|4|4"})

Using Weblogic Server 7.0 SP6 and j2sdk1.4.2_13

Thank you
Srini
LightInTheBox - Buy quality products at wholesale price