- This topic has 15 replies, 2 voices, and was last updated 10 years, 9 months ago by Brandon.
-
AuthorPosts
-
stealthtrooperMemberHiya,
I’ve set up a page with a header image and footer image. In between I have an HTML panel. I’d like the html panel to automatically load another page (eg http://www.google.com) while preserving my header and footer. Please could anyone help?
BrandonMemberAs iframes dont work too well you can always use a panel widget, and place the html widget inside that this lets it scroll) then use an ajax call in the html widget to load the page:
<div id="success" width="100" height="100"></div> <script> $("#success").load("http://google.com");// </script>
stealthtrooperMemberPerfect – Thank you very much 🙂
BrandonMemberNo probelm.
stealthtrooperMemberHiya,
Sorry but that worked in the mobile web simulator but when I publish the target design as mobile web application and test it on my phone the page doesn’t load. Please help again.
Thanks
Paul
BrandonMemberHow are you calling it?
stealthtrooperMemberI’ve copied and pasted your exact code into an HTML panel.
BrandonMemberCan you share the link of the web app with me. If you dont want to post it here you can email it to me at info at cincyplanet dot com
stealthtrooperMemberHiya,
Thanks again – I’ve emailed the link of where I’ve got so far. On the main menu if you select “Natural Range” thats the page I can’t get to work.
BrandonMemberI noticed in your code you are using this same code several times. This can cause problem in M1 as the site is loaded as a single page html file. Try renaming any other instances of the code:
<div id=”success” width=”100″ height=”100″></div>
<script>
$(“#success”).load(“https://www.naturalinstinct.com/checkout.php”);//
</script></div><div id=”success1″ width=”100″ height=”100″></div>
<script>
$(“#success1”).load(“https://www.naturalinstinct.com/checkout.php”);//
</script></div><div id=”success2″ width=”100″ height=”100″></div>
<script>
$(“#success2”).load(“http://www.naturalinstinct.com/cart.php”);//
</script></div>etc…and see if that fixes it.
Also for the height and width you can add the percent sign so it takes up the whole page. This forum wont allow the symbol though….
stealthtrooperMemberThanks for all your help but I’m still getting blank pages:-(
BrandonMemberTwo things to try.
One, start a new project. A new form, add an html widget, add the code and run it and see if it works.
Two, I noticed you are using the mobione published site, I would try uploading it to your own server and see if that makes a difference, I don’t think it would, just just in case.
stealthtrooperMemberstill no joy:-(
BrandonMemberSometimes I feel not so smart.
Ajax load is restricted by the cross domain policy. So it has either has to been on the same domain or a domain that allows cross domain.
stealthtrooperMemberI’m still trying to figure this out and have it semi working using an iframe but is there a way to make the webpage fit the iframe so you don’t have to scroll left and right to view the page?
Thanks
-
AuthorPosts