We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Load url in iFrame.

Home Forums Puzzles Load url in iFrame.

Tagged: ,

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #34085
    cfxs
    Customer

    I have an iframe on my page with id=”iframe”. I would like to have a page loaded when for example a button is clicked.

    for example: google.com should be loaded in the iframe.

    What puzzles do I need? Or do I have to witte custom code?

    Hope someone can help.

    #34090

    Hi, there’s no puzzles exactly for that, but you can use “exec code” like this:
    iframe.png

    The code in the “exec script” puzzle is:

    
    document.getElementById('iframe').src = 'https://www.soft8soft.com/';
    

    Btw, there’s a restriction on what you can load inside an iframe, for example, google.com doesn’t allow to load its pages like that.

    Attachments:
    You must be logged in to view attached files.

    Co-founder and lead developer at Soft8Soft.

    #34094
    cfxs
    Customer

    Hi, there’s no puzzles exactly for that, but you can use “exec code” like this: iframe.png
    The code in the “exec script” puzzle is:

    Btw, there’s a restriction on what you can load inside an iframe, for example, google.com doesn’t allow to load its pages like that.

    thank you for the explanation. The pages that will be loaded are from my own domain. I have setup the puzzle like you did but I get this error in my console. If I google it I come across something like the page is not fully loaded yet.

    Attachments:
    You must be logged in to view attached files.
    #34110

    I have setup the puzzle like you did but I get this error in my console. If I google it I come across something like the page is not fully loaded yet.

    Do you load your verge3d application inside an iframe as well? That also may be the case. If true, then you need to change a little bit the code inside “exec script”:

    
    parent.document.getElementById('iframe').src = 'https://www.soft8soft.com/';
    

    Co-founder and lead developer at Soft8Soft.

    #48623
    fireups
    Customer

    So I have an app that works great when I call the URL directly. I need to run this in an iframe. When I do the eventHTMLElem dont work. Its like the isparent is not making the connection

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.