Why sometimes the script part of iframe embed code needs to be removed?

  • Nabilbugaighis
    Asked on December 7, 2015 at 12:54 AM

    Hi.

    I was having a problem with the script embed code on Android phone.

    I saw on Support that I should use Iframe.  I also saw that I should only use the part between <iframe> and </iframe> and also remove the (onDISABLEDload="window.parent.scrollTo(0,0)")

    I tried the full Iframe code, and it did not work.  When I followed the instructions above, it worked.

    My question, is why do you provide a long Iframe code that does not work, and we have to strip it down to make it work?  Why not just provide the part we need?

    Thank you.

  • Ben
    Replied on December 7, 2015 at 2:04 AM

    Fair question. The answer is that the reason why the original js embed form did not work for you is because either conflict or your phone is not able to coupe with a large form created over javascript (js).

    In your case it is clear that the issue were conflicts.

    Now when conflicts are causing issues, they will impact that script part under the iframe in many cases as well, but it is always best to try and see if they do.

    Now that script code gives you some additional features to the iframe embed code, such as passing the data to the widgets, resizing the iframe when needed, and similar.

    So the summarized answer would be that the script part that comes together with the iframe is useful, but if it is impacted by conflicting code, then it can be removed and everything just works :)

    Hope that this explains it, but if you have any additional questions, do let us know and we would be happy to answer the same :)