Skip to main content
Participating Frequently
September 30, 2007
Question

loading new data in cfwindow

  • September 30, 2007
  • 2 replies
  • 363 views
Here's the problem.

Have a page that lists a bunch of records. Each record has a link to edit the record and I've set the code up to add the record ID to the url of the page that will open up in cfwindow:

<a href="javascript:;" onClick="ColdFusion.Window.create('edit', 'Top Priority',
'edittoppriority.cfm?id={intltcwptoppriorityid}&island=<cfoutput>#intislandid#</cfoutput>',
{x:100,y:50,height:550,width:1000,modal:false,closable:true,
draggable:true,resizable:true,center:true,initshow:true,
minheight:200,minwidth:200})">Edit</a>

Code runs fine and when I clik the Edit link, the window opens and the record in edittoppriority.cfm is displayed and I can update it.

After I close the cfwindow and go to a new record and click the Edit link I get the previous record loaded in cfwindow.

If I refresh the page and click the the same record, I get the information for that record.

So...How do I get cfwindow to flush out the variables that were sent so that it uses the new variables next time a link is selected.

Hoping someone can help me out before I have to move on and go with the old-fashined pop-up window.

Thanks
    This topic has been closed for replies.

    2 replies

    January 11, 2008
    That is one way to fix it, but you will end up with a bunch of cfwindows loaded in memory.
    Another way to do it is using the javascript functions ColdFusion.navigate() to reload another page in the same window and ColdFusion.Window.show() and ColdFusion.Window.Hide() to open and close the window.

    Participating Frequently
    October 5, 2007
    Found the solution:

    Give the cfwindow a unique name