JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
Why sometimes the script part of iframe embed code needs to be removed?Asked by Nabilbugaighis on December 07, 2015 at 12:54 AM
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 (onload="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?
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 :)