I have found some code in the Trinidad js sources which parses pprscript nodes 
from the iframe response and adds this script nodes to the main frame. Would 
this be a possibility to add own scripts which executes only in the mainframe? 

Regards
Jochen

-----Ursprüngliche Nachricht-----
Von: Böhringer Jochen [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 7. Dezember 2006 11:32
An: [email protected]; [email protected]
Betreff: Trinidad: How does PPR replace content in the dom?

Hello,

how does PPR replace content in the dom of the page. I know that PPR uses an 
IFrame. But how is the data loaded into the IFrame copied into the main page?

I guess it could be realized this way:

1.) Load new HTML markup into the IFrame.
2.) Copy the new markup in the Iframe to the main Frame using .innerHtml

Am I right or is it done using another mechanism? If I'm right and I have a 
component whose renderer generates markup containing 
<script>alert('Test');</script>

This scriptlet would first be executed after loaded into the iframe. And would 
be executed a second time if the ppr mechanism has copied it into the main 
frame. Is this correct?

If yes, how can I generate a javascript in a renderer which is called after the 
markup is copied into the mainframe and not in the iframe? Is there a special 
trick I can use in a component using PPR capabilities? I would like to do it 
the Trinidad way, because I would like to donate my DragAndDrop component (as 
soon as it works) back to Trinidad.

Regards
Jochen

Reply via email to