rgiljohann Posted October 8, 2019 Report Share Posted October 8, 2019 I have a page Shown Here that has a couple of datapages deployed as Iframes. My table at the bottom has a custom script which is also shown below. As you can see, this is causing the iframe to show below the footer of the website and not where originally specified. When I take away the javascript and just use the iframe deploy code, it works correctly. Does anyone know why it might be showing up so low in the website? <noscript><iframe border="0" frameborder="0" height="1000px" marginheight="0" marginwidth="0" name="iframe" src="https://c1abv844.caspio.com/dp/91cf7000e1c04a6858f7405d90f8" width="100%">Your browser does not support inline frames or is currently configured not to display inline frames.</iframe></noscript><script type="text/javascript"> var form = 'https://c1abv844.caspio.com/dp/91cf7000e1c04a6858f7405d90f8'; var params = window.location.search; var thisScript = document.scripts[document.scripts.length - 1]; var iframe = document.createElement('iframe'); iframe.setAttribute('src', form + params); iframe.setAttribute('width', '100%'); iframe.setAttribute('height', 500); iframe.setAttribute('type', 'text/html'); iframe.setAttribute('frameborder', 0); iframe.setAttribute('allowTransparency', 'true'); iframe.style.border = '0'; thisScript.parentElement.replaceChild(iframe, thisScript); </script> Quote Link to comment Share on other sites More sharing options...
Vitalikssssss Posted October 9, 2019 Report Share Posted October 9, 2019 Hi @rgiljohann, Try removing <noscript> tags which you have used to wrap Iframe. Also, I think you can set all Iframe attributes within <iframe> tags i.o. using a JS code. Hope this helps. Regards, vitalikssssss Quote Link to comment Share on other sites More sharing options...
rgiljohann Posted October 9, 2019 Author Report Share Posted October 9, 2019 I tried taking out the noscript, and it works to put the original Iframe in the correct spot, but the reason for the javascript in the first place is to grab the parameter from the URL and send to the iframe. The iframe with the noscript does not receive this parameter, but the iframe below my footer does receive it correctly. Quote Link to comment Share on other sites More sharing options...
Vitalikssssss Posted October 10, 2019 Report Share Posted October 10, 2019 Hi @rgiljohann, There is an easier way how you can pass a parameter from URL to an Iframe. You can simple paste the parameter into Iframe src e.g. <iframe src="URL?HHAIPName=[@HHAIPName]" width="100%" height="1000" type="text/html" frameborder="0" style="border: 0"> This should help you to remove your JS code and <noscript> tags. Regards, Vitalikssssss Quote Link to comment Share on other sites More sharing options...
rgiljohann Posted October 10, 2019 Author Report Share Posted October 10, 2019 That works. Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.