dcsimg
AJAX call from child to parent
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Kelum_Thenuwara
Posted On:   Monday, November 12, 2007 12:44 AM

hi, here i am using window.opener() javascriipt function to open new child window and from that i am calling a AJAX function on parent. but it seems not working and i think the opener window is closed and before the AJAX request is finished, the AJAX object is destroyed. i found a solution for this is pretty simple. Call a dummy function in the window.opener from the popup, which will call the actual AJAX function via a setTimeout. Example At the POPUP window : // call a dummy function at the opener window parent.opener.dummyFunction(); window.close(); ]]>]]> At the   More>>

hi,


here i am using window.opener() javascriipt function to open new child window and from that i am calling a AJAX function on parent. but it seems not working and i think
the opener window is closed and before the AJAX request is finished, the AJAX object is destroyed.


i found a solution for this is pretty simple. Call a dummy function in the window.opener from the popup, which will call the actual AJAX function via a setTimeout.



Example



At the POPUP window :







At the OPENER Window :







but the draw back of this is we can not gurantee the time taken for ajax function hence it is really difficult to predict the time for AJAX function and this may fail...


Do u have any good solution for this..


thanx and Best Reagrds

Kelum

   <<Less
About | Sitemap | Contact