iframe disappears

Forums Dynamic Forms for SharePoint iframe disappears


This topic contains 3 replies, has 2 voices, and was last updated by  Ivan Wilson 1 day, 14 hours ago.

  • Author
  • #18175

    Ivan Wilson

    In one tab I have a HTML field that has an iframe.
    I have a rule that posts to the iframe.

    This works fine on my display form, but in my edit form the iframe contents disappears if I switch to the tab that contains the iframe.

    Using the developer tools, I can see the correct iframe details are loaded by the rule that runs on load. However, once I click on the tab that contains the html field with the iframe, the head and body tags are cleared. No rules are run, so I don’t know what is causing the iframe contents to disappear

    Any suggestions on how to troubleshoot or fix this?

    • This topic was modified 1 week, 1 day ago by  Ivan Wilson.
  • #18206

    Ivan Wilson

    My attempts at debugging this haven’t gotten me a lot further. Somewhere between clicking on the tab and the tab loading, the iFrame is getting lost.

    I added a function to call in the tab’s click event. Using the browser debugger I can tell that by the time that function is called, the iframe contents is lost. The call stack doesn’t reveal much and there are no warnings or errors in the console.

    The odd thing is that this works fine in the display form, just not in the edit form.

    I’ve tried loading different pages in the iframe, but that doesn’t affect it. I’ve attached a before and after image of the DOM to show what’s happening.

  • #18229

    Alexander Bautz

    Sorry for the late reply. I haven’t actually tried using an iframe in a HTML section like this myself – what exactly are you using it for? – maybe there is another way to achieve the same result?


  • #18233

    Ivan Wilson

    I’m displaying a web page from a separate external website. I pass the details in the list item as part of a POST request and this loads a page of related information in the iFrame.

    It works great on the display form, but something strange seems to be happening on the edit form.

You must be logged in to reply to this topic.