Passing value on submit to iFrame RRS feed

  • Question

  • User-1358008948 posted


    I have two iframes, I want to pass 'Stop No' (getElementById('TextBox2') value to the iframe on the left with this URL: https://localhost/Map/Stop/'+document.getElementById('TextBox2').value

    It is doing the opposite. Instead of passing the URL to the left iframe, it's loading on parent frame. 

    What I want it to do is when you click on 'Submit', I want the results to stay on parent (right frame) and pass value / url to the left frame. Please see my screenshots or see it in action here

    <button type="submit" id="iFrame0" class="btn btn-primary btn-block" style="width: 100%" onclick="window.location.href='https://localhost/Map/Stop/'+document.getElementById('TextBox2').value;" return false; formtarget="se_frame1">Submit</button>

    Thursday, August 29, 2019 4:19 PM

All replies

  • User-474980206 posted
    You onclick code is replacing the page. Remove it, and be sure target is the iframe name.
    Friday, August 30, 2019 1:49 AM
  • User665608656 posted

    Hi diskovered,

    According to your description, I recommend that you should first confirm that the ID of the formtarget in your button is correct.

    After making sure that your formtarget is correct, you can refer to the following link to pass parameters to another iframe:

    Pass values from Parent to IFrame

    Best Regards,


    Friday, August 30, 2019 6:05 AM