Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...iframe, js and dnniframe, js and dnn
Previous
 
Next
New Post
10/30/2014 11:42 PM
 

Wasn't sure where to to post this and although at first it may not seem dnn related, and indeed it may not be, I at least have to rule it out.

I set up an iframe to auto size depending on the content. It worked great and is...was very cool.

However after a few days it stopped working. I have asked this question at other, more js specific forums, but no one had an answer.

The problem is that, as far as I know, nothing has changed. It just stopped working. Definitely the js and iframe code did not change. I would have remembered changing it, but had no reason to so as it was working fine.

The iframe code:

<iframe src="http://example.com/restaurant.aspx" =" resizeIframe(this);" scrolling="No" id="iframe" width="950px">
</iframe>

The js code:

<script language="javascript" type="text/javascript">
  function resizeIframe(obj) {
    obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px';
  }
</script>

I used Will Strohl's Content Injection module for the js code as I have done for other instances without issue.

The ONLY thing that I think might have changed are the quotes. The original code had single quotes but the code in my iframe has double quotes. No one in the other forum advised that this could be the problem. Does someone here know if that could be the issue?

I have tried to change the double quotes to single but upon saving the html module, it reverts to double quotes. I have checked the html module manager but am unsure of what setting might be responsible for this, if there is one. Regardless, I didn't make any changes in the manager.

Could the host have made a change of some sort that would affect the running of this script?

Any ideas on this?

Bob

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...iframe, js and dnniframe, js and dnn


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out