PDA

View Full Version : Passing textfield values between an iframe and the parent page? HELP!


noonespecial
04-21-2006, 05:23 AM
I am looking for a cross-browser way to pass a textfield value from an iframe into the parent page.

I have one page with an iframe in it - I use it to upload an image - the image's URL is put in a textfield in the iframe - I want onload to send it to the another textfield on the page that has the iframe.

I can do this in IE using the following code - but it doesn't work in firefox. Any help would be amazing.

Parent page textfield:

<input name="field5" size="60" value="" class="bginput" id='results' style="margin:8px;"/>

Iframe:
<script Language=JavaScript>
function xferContent(){isContent=document.getElementById('c ontent').innerHTML;parent.frames.document.getEleme ntById('results').value=isContent;}
</script>

<Div class="style1" id='Content'>www.transferedlink.com</Div>

PLEASE help in any way..