facebook

Auto load page

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #346673 Reply

    Hiya,

    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?

    #346674 Reply

    Brandon
    Member

    As 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>
    #346731 Reply

    Perfect – Thank you very much 🙂

    #346732 Reply

    Brandon
    Member

    No probelm.

    #346735 Reply

    Hiya,

    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

    #346737 Reply

    Brandon
    Member

    How are you calling it?

    #346738 Reply

    I’ve copied and pasted your exact code into an HTML panel.

    #346739 Reply

    Brandon
    Member

    Can 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

    #346741 Reply

    Hiya,

    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.

    #346743 Reply

    Brandon
    Member

    I 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&#8221;);//
    </script></div>

    <div id=”success1″ width=”100″ height=”100″></div>
    <script>
    $(“#success1”).load(“https://www.naturalinstinct.com/checkout.php&#8221;);//
    </script></div>

    <div id=”success2″ width=”100″ height=”100″></div>
    <script>
    $(“#success2”).load(“http://www.naturalinstinct.com/cart.php&#8221;);//
    </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….

    #346744 Reply

    Thanks for all your help but I’m still getting blank pages:-(

    #346745 Reply

    Brandon
    Member

    Two 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.

    #346747 Reply

    still no joy:-(

    #346751 Reply

    Brandon
    Member

    Sometimes 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.

    #347030 Reply

    I’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

Viewing 15 posts - 1 through 15 (of 16 total)
Reply To: Auto load page

You must be logged in to post in the forum log in