Some details explain: Tree view assume ------------------ r...@shamun# ls www/index.php www/route.php www/old.test.php www/tpl.bedrijven.php .../js ....../jquery.js ....../default.js ....../global.js ....../dtree.js .../intranet ............/modules/ ..................../search.php ..................../result.php ..................../index.php
1. www/index.php: ==================================== <!-- left menu --> <h3> # dddddd </h3> <div id="database_a"> <!-- Main Tree --> <script type="text/javascript"> dba = new dTree( 'dba' ); dba.add( 0,-1,'MENU ( javascript: dba.openAll(); open alles | javascript: dba.closeAll(); sluit alles ) '); dba.add( 1,0,'Databases','#' ); dba.add( 2,0,'Duplicates','#' ); dba.add( 3,0,'Blanco controle','#' ); //dba.add( 4,0,'Hoeveel Aanvrager/Adverteerder','#' ); document.write( dba ); </script> </div> <!-- All modules headers --> <h3> # (XYZ) </h3> <!-- Here iframe/submit forms/popup handle --> <div id="_facturatie_ra"> </div> 2. www/index.php > www/js/default.js > left tree menu on click > =============================================================== case 'Databases':{ // This is a template var db = myAjaxReturn('intranet/modules/search.php', ''); // For performence var frame = '<iframe frameborder="0" width="100%" height="600px" id="companiesframe" name="companiesframe" src="javascript: \'<html></html>\';" > </iframe>'; $('#_facturatie_ra').empty().append(frame) ; // Iframe no risk for other browsers. $('#companiesframe').load(function(){ try { $(this).contents().find('body').html( db ); $(this).unbind('load'); }catch(e){ } }); }break; 3. inside the iframe i have something like this senario ========================================================== A submit click > gets B > B on click > open popup C > on C click > D open > E trigger > Main document which is getting failed. a) /intranet/modules/search.php ================================= # I am a search box, i act only in server script <form action="intranet/modules/result.php" method=get target="_self"> <input type=text name=somthing /> <input type=button name=submit /> </form> b) /intranet/modules/result.php ================================== # i am a result window, to open a popup children < a href='#' class=link onclick= "window.open('index.php?ID=1','','width=700,height=500,scrollbars=yes');" > Test suite </ a> c) /intranet/modules/index.php ================================ #i am a popup window with parent <script src="../../js/jquery.js" type="text/javascript" ></script> <script> $(document).ready(function(){ //var root = $(window.opener.parent.document.body); $('#bedrijf').live('click',function(){ //root.find('#sdd1').trigger("click"); //root.attr( 'class' , 'yui-skin-sam Bedrijven' ); //root.find('a._facturatieB' ).html( '(Bedrijven)' ); //root.find('#_facturatie_ra').load('../../tpl.bedrijven.php'); //myAjax('include/add_edit_del.php?model=ajax_loginput', 'oper=search&about=Bedrijven'); window.opener.location.href='../../router.php'; window.close(); }); }); </script> d) www/router.php: ======================= <body> Module's router.. </body> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){ var root = $(parent.window.document.body); root.attr( 'class' , 'Bedrijven' ); root.find('a._facturatieB' ).html('(Bedrijven)' ); // // // // [problem] - This load html/javascript, but cant trigger a prent.window exactly the same way // if i had clicked it mannualy using mouse. // // // root.find('#_facturatie_ra').load('old.test.php'); }); </script> e) www/old.test.php ============ <body> <?php echo 'hello'; ?> <script type="text/javascript"> $(document).ready(function(){ alert ('jQuery is loaded on fly'); // ok // // // parent.window.document.$('#sdd1').trigger('click'); // // $('#sdd1').trigger('click'); // not working.... }); </script> </body> Problem: ================= in part 3.e $('#sdd1').trigger('click'); normally execute this two line, after that, i have html/css but i don't have same affect like, manually if we do a mouse click. $( 'a._facturatieB' ).html( '(Bedrijven)' ); // ok // Load html/css/js event+ajax $( '#_facturatie_ra' ).load('tpl.bedrijven.php'); // never triggering correctly. Thanks in advance Shamun -- View this message in context: http://old.nabble.com/window-open-opener-parent-tp27408466s27240p27408466.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.