-1

firstly sorry for my English.

I have an iframe:

<dl class="ctrlUnit">
    <dt>{xen:phrase image_url}:</dt>
    <dd><input type="text" name="redactor_image_link" id="redactor_image_link" class="textCtrl" /></dd>
</dl>
<div style="border: 3px dotted #a0a0a0; overflow: hidden; margin: 15px auto; max-width: 650px;">
                 <iframe src="http://img.uforum.uz" width="650px" height="483px" align="center"style="border: 0px none; margin-left: 0px !important; height: 483px; margin-top: -10px; width: 665px;">
                    Ваш браузер не поддерживает плавающие фреймы!
                </iframe>
        </div>
<dl class="ctrlUnit submitUnit">
    <dt></dt>
    <dd>
        <input type="button" name="upload" class="redactor_modal_btn button primary" id="redactor_image_btn" value="{xen:phrase insert}" />
        <a href="javascript:void(null);" class="redactor_modal_btn redactor_btn_modal_close button">{xen:phrase cancel}</a>
    </dd>
</dl>

Via this iframe users can upload image and paste direct URL into the input form manually

After uploading, http://img.uforum.uz will redirect to the http://img.uforum.uz/upload.php, and in this page needs automatically paste value (URL from iframe input):

<input type="text" value="http://img.uforum.uz/images/luqihve4440494.jpg" name="direct" size="50">

to second input (which placed not in iframe, but above the iframe code):

<dd><input type="text" name="redactor_image_link" id="redactor_image_link" class="textCtrl" /></dd>

I don't know JavaScript and need your help)

Thank's in advance.

  • 1
    you can read this answer, it maybe help you a lot. https://stackoverflow.com/questions/15002652/get-value-of-input-field-inside-an-iframe – Horken Jun 30 '17 at 05:40
  • Possible duplicate of [Get value of input field inside an iframe](https://stackoverflow.com/questions/15002652/get-value-of-input-field-inside-an-iframe) – shaochuancs Jun 30 '17 at 06:29

1 Answers1

-1

Set id then get it by:

var iframetext = document.getElementById("myiframe").innerHTML;
wedo
  • 129
  • 1
  • 11