1

I currently have a ColdFusion page that has a list division on the left side and a details division on the right. When a record is added through a button-click on the details side, I want to rebuild the whole page so the new record will be displayed in the list. I have set the CFLOCATION to go to the complete page (the one containing the two divisions), but what I'm getting is that it displays the original list in the left division, and then displays the complete page (list and details) in the right division. How can I make my CFLOCATION tag replace the original page rather than trying to just cram it into the one division? Here's the CFLOCATION tag:

<CFLOCATION URL="Listframe.cfm?ID=#Form.IDDancer#">
James A Mohler
  • 11,060
  • 15
  • 46
  • 72
Ross from Brooklin
  • 293
  • 1
  • 5
  • 18
  • One, the cflocation tag is not showing up. Two, what exactly are these divisions? Are they `iframes`, `div tags`, or something else? – Dan Bracuk Feb 05 '18 at 20:13
  • Why are you using a `cflocation` here? Can you provide some examples? https://stackoverflow.com/help/mcve – Shawn Feb 05 '18 at 20:18
  • Dan, the left hand div (list) just contains regular html. The right hand div, for the details, is an iFrame. I'm pretty new to both HTML and especially CF programming so any help would be appreciated. – Ross from Brooklin Feb 05 '18 at 20:24
  • 2
    It's hard to know without posting some code. However, from the description of your scenario it sounds likely that your _whole page_ is structured with your _left division_ in a `
    ` and your _right division_ in an `
    – user9263373 Feb 05 '18 at 20:24
  • @RossfromBrooklin I posted my comment prior to reading your response. See my comment above. – user9263373 Feb 05 '18 at 20:34
  • 2
    The easiest, while not necessarily best way to do this is to get rid of the iframe and post the form to the page containing the form. – Dan Bracuk Feb 05 '18 at 20:59

1 Answers1

0

You could possibly use JavaScript (instead of cflocation) to force the location of the top/parent page.

I've used code like this before:

<script>
window.parent.location.href = "https://www.google.com";
</script>

Other options: How to reload Main Page from within an iFrame

Scott Jibben
  • 2,229
  • 1
  • 14
  • 22