Surya,
Thank you for your reply.
Could you please give me some detail about the logic. Are you trying
to send a duplicate trigger to the opener from popup so that it would
reload again?
I was wondering why the pageLink in opener page is hidden & not
displayable!
In the popup is the closeDialogue called after the popup submit?
Thanks,
Vijay
Surya Prakash
<[EMAIL PROTECTED] To: Tapestry users
<[email protected]>
urface.com> cc:
Subject: RE: How can i
reload parent page consistently?
07/28/2005 03:07 AM
Please respond to
Tapestry users
Hi,
I also faced the same problem, and came up with the following solution:
In your popup page, add something like this:
<script type="text/javascript">
function closeDialogue() {
var form =
document.getElementById("ok").form;
// ok is submit buttion id
if (form.closeDialogue.value ==
"T") {
if (window.opener)
window.opener.siteOpened();
// siteOpened is a javascript function in the opener page
closeWindow();
}
}
</script>
<form jwcid="@Form" listener="ognl:mylistener">
<input jwcid="[EMAIL PROTECTED]" type="hidden"
value="ognl:closeDialogue"/>
// In your opener page se the property closeDialogue to false initially.
// Set this value to true, once you submit the form in the popup page
// other form fields here
</form>
In your opener page, add like this:
<a jwcid="@PageLink" page="your page name" id="siteOpened"
style="display:none"/>
//above link is hidden from user
<script type="text/javascript">
function siteOpened() {
window.location.href=document.getElementById("siteOpened").href;
}
</script>
Hope this helps.
Surya
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: 27 July 2005 18:07
To: [email protected]
Subject: How can i reload parent page consistently?
Hi,
I have the following scenario
1) From a tapestry page, i open a popup window using pagelink
2) User selects an item from propertyselection component in popup
3) User clicks a button in popup which triggers a javascript that
submits the popup,tries to reload the parent page and closes itself
4) Parent page pageBeginRender(PageEvent event) is called which
prints(in log file) the updated data, but the html page is not updated
with
new data (Embedded image moved to file: pic27606.gif)Question(I can see
it if i manually reload the page!)
My javascript is as follows:
<script language="JavaScript">
function processAddCriteria()
{
document.Form0.submit();
window.opener.location.reload(true);
window.close();
}
</script>
I tried //window.opener.document.forms[0].submit(); as suggested by
someone, it does not work either.
Any suggestions would be greatly appreciated!!
Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]