-
realestatecoachAsked on April 23, 2015 at 5:21 PM
Hello,
I have tried to build a form similar to some that I have seen on other websites. When I place on my website using the iframe code- The transparency seems to disappear when I save the project on my personal website.
Here is the code from Jotform:
<iframe id="JotFormIFrame" onDISABLEDload="window.parent.scrollTo(0,0)" allowtransparency="true" src="//form.jotform.us/form/51125926485156" frameborder="0" style="width:100%; height:638px; border:none;" scrolling="no"></iframe>
<script type="text/javascript">window.handleIFrameMessage = function(e) {var args = e.data.split(":");var iframe = document.getElementById("JotFormIFrame");if (!iframe)return;switch (args[0]) {case "scrollIntoView":iframe.scrollIntoView();break;case "setHeight":iframe.style.height = args[1] + "px";break;case "collapseErrorPage":if (iframe.clientHeight > window.innerHeight) {iframe.style.height = window.innerHeight + "px";}break;case "reloadPage":window.location.reload();break;}};if (window.addEventListener) {window.addEventListener("message", handleIFrameMessage, false);} else if (window.attachEvent) {window.attachEvent("onmessage", handleIFrameMessage);}</script>
Here is the code after is has been saved in the html field of website:
<p><iframe id="JotFormIFrame" style="width: 55%; height: 238px; border: none;" src="//form.jotform.us/form/51125926485156" width="300" height="150" frameborder="0" scrolling="no"></iframe></p>
<script type="text/javascript">// <![CDATA[
window.handleIFrameMessage = function(e) {var args = e.data.split(":");var iframe = document.getElementById("JotFormIFrame");if (!iframe)return;switch (args[0]) {case "scrollIntoView":iframe.scrollIntoView();break;case "setHeight":iframe.style.height = args[1] + "px";break;case "collapseErrorPage":if (iframe.clientHeight > window.innerHeight) {iframe.style.height = window.innerHeight + "px";}break;case "reloadPage":window.location.reload();break;}};if (window.addEventListener) {window.addEventListener("message", handleIFrameMessage, false);} else if (window.attachEvent) {window.attachEvent("onmessage", handleIFrameMessage);}
// ]]></script>
Thank you
-
BenReplied on April 23, 2015 at 6:32 PM
We can only assist with one issue per thread, but you should always include a direct link to the form since, when I went to your website I was not able to find any jotform under Homes By City segment, nor when I selected some city and in order for us to be able to assist you it would be best to have the direct link so that we can see the exact form with any issue that you have.
Please give us a link to the form with transparency issue and for other issues, do open a new thread (per issue) instead.
Thank you.
-
realestatecoachReplied on April 24, 2015 at 12:22 PM
I have tried to build a form similar to some that I have seen on other websites. When I place on my website using the iframe code- The transparency seems to disappear when I save the project on my personal website.
Here is the code from Jotform:
<iframe id="JotFormIFrame" onDISABLEDload="window.parent.scrollTo(0,0)" allowtransparency="true" src="//form.jotform.us/form/51125926485156" frameborder="0" style="width:100%; height:638px; border:none;" scrolling="no"></iframe>
<script type="text/javascript">window.handleIFrameMessage = function(e) {var args = e.data.split(":");var iframe = document.getElementById("JotFormIFrame");if (!iframe)return;switch (args[0]) {case "scrollIntoView":iframe.scrollIntoView();break;case "setHeight":iframe.style.height = args[1] + "px";break;case "collapseErrorPage":if (iframe.clientHeight > window.innerHeight) {iframe.style.height = window.innerHeight + "px";}break;case "reloadPage":window.location.reload();break;}};if (window.addEventListener) {window.addEventListener("message", handleIFrameMessage, false);} else if (window.attachEvent) {window.attachEvent("onmessage", handleIFrameMessage);}</script>
Here is the code after is has been saved in the html field of website:
<p><iframe id="JotFormIFrame" style="width: 55%; height: 238px; border: none;" src="//form.jotform.us/form/51125926485156" width="300" height="150" frameborder="0" scrolling="no"></iframe></p>
<script type="text/javascript">// <![CDATA[
window.handleIFrameMessage = function(e) {var args = e.data.split(":");var iframe = document.getElementById("JotFormIFrame");if (!iframe)return;switch (args[0]) {case "scrollIntoView":iframe.scrollIntoView();break;case "setHeight":iframe.style.height = args[1] + "px";break;case "collapseErrorPage":if (iframe.clientHeight > window.innerHeight) {iframe.style.height = window.innerHeight + "px";}break;case "reloadPage":window.location.reload();break;}};if (window.addEventListener) {window.addEventListener("message", handleIFrameMessage, false);} else if (window.attachEvent) {window.attachEvent("onmessage", handleIFrameMessage);}
// ]]></script>
Thank you
-
Kiran Support Team LeadReplied on April 24, 2015 at 3:06 PM
I see that there is a conflict with the background color in the injected CSS code and there is some additional CSS code added to your JotForm titled "Contact Form Guaranteed Home Sale". I've made some changes to the CSS code on your JotForm to make the form background transparent. Now, the form embedded on your webpage is now displayed with transparent background.
Please get back to us if you need any further assistance. We will be happy to help.
-
realestatecoachReplied on April 24, 2015 at 3:50 PM
Thank You So Much!!!
That is so awesome. I don't know how you did that. I was hoping to do that on a few other pages of mine- Is there something I should copy over to the other forms in the future?
-
Kiran Support Team LeadReplied on April 24, 2015 at 4:10 PM
Here are the changes what I made to your JotForm to edit from CSS properties from the injected CSS code of Form preferences.
1. Removed the background color property that is set to display with White color (#ffffff)
I see a thin border through the form after removing the background-color. So I checked it further and edited the following CSS properties from the bottom section of injected CSS code.
Hope this information helps. Please be noted that the injected CSS code might vary from form to form and you may not see the same properties. If you need any further assistance with your other JotForms, you can always get back to us by posting a question here in the support forum. We will be happy to help!
Thank you.