Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Inject HTML into iFrame

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #147744
    Shane Hicks
    Participant

    I am trying to simplify my client’s website modification system to help get an idea of what they want. I need to be able to add JavaScript to an iFrame of their website. Below is an example of how I need it to work.

    Client accesses page (www.theirdomain.com/page1) that has a drop-down of all the pages on their website (or possibly as textbox for them to enter the URL). Client then clicks a submit button.

    The iFrame redirects to the page (www.theirdomain.com/page2) and automatically adds the JavaScript to the webpage.

    For the sake of time, I need to stick with method I am currently trying to use

    Here is the code I want to add to the pages and below is the exact same code I wish to add to the iFrame.

    <script src="http://www.jotform.com/min/?g=feedback2" type="text/javascript"></script>
    <script type="text/javascript">
    new JotformFeedback({
    formId : "XXXXXXXXXXXX",
    buttonText : "Make Changes",
    windowTitle : "Mark up the screenshot to describe a problem or suggestion",
    base : "http://jotform.us/",
    background : "#77BCD9",
    fontColor : "#FFFFFF",
    buttonSide : "bottom",
    buttonAlign : "right",
    type : false,
    width : 280,
    height : 420,
    instant : true
    });
    </script>

    Also, It would be very helpful if someone could provide code for me. Thank you ahead of time.

    #147760
    James
    Participant

    You mean, directly inject HTML in to an iFrame element, or inject the code in to the HTML Document displayed inside the iFrame? If the second option, it’s not possible.

    PS, no need for double posting.

    #147802
    Senff
    Participant
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Inject HTML into iFrame’ is closed to new replies.