Skip to main content
Inspiring
May 23, 2012
Question

Refresh "parent" page when closing a cfwindow

  • May 23, 2012
  • 1 reply
  • 1904 views

When displaying a cfwindow and I click the x in the top right, how can I refresh the "parent" page?

The cfwindow has a small form that collects data in a couple of fields then submits in the cfwindow to a page that inserts the request, sends and email and says the action is complete.

This is my cfwindow:

<cfajaximport tags="cfform,cfwindow"> 

<cfwindow

   name="NewRequestWindow"

   center="true"

   closable="true"

   draggable="false"

   height="550"

   width="700"

   modal="true"

   initShow="false"

   refreshOnShow = "true"

   resizable="false"

   title="#WindowText#"

   source="NewRequest.cfm?pk=#pk#" />

<a href="#" onclick="javascript:ColdFusion.Window.show('NewRequestWindow')"><img src="../includes/images/add.png" alt="Add" title="<cfoutput>#WindowText#</cfoutput>" width="16" height="16" border="0" /></a>

Thanks, Cliff

    This topic has been closed for replies.

    1 reply

    May 25, 2012

    This JavaScript will reload the current page:

    document.location.reload()

    From within your cfwindow it should work for the entire page.

    copied from other post http://forums.adobe.com/message/3227674