Results 1 to 3 of 3

Thread: [JavaScript]Accessing Iframe with IE/FireFox

Threaded View

  1. #1

    Thread Starter
    PowerPoster Pc_Madness's Avatar
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    2,765

    Resolved [JavaScript]Accessing Iframe with IE/FireFox

    Grumble!


    Trying to set the contents of a hidden input field of a form inside an iframe to the value of a textbox. In IE I have to use,
    document.frames[0].document.forms[0].sender.value = document.getElementById('txtName').value;

    Which doesn't work in FireFox, but for the FireFox method to work I have to do,

    document.getElementById('sendmessage').contentDocument.frmSend.sender.value = document.getElementById('txtName').value

    Which doesn't work in IE.

    Is there a right or wrong method or something else I've completely missed here?
    Last edited by Pc_Madness; Jun 27th, 2005 at 08:47 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width