get content from iframe

Discussion in 'JavaScript' started by dramiditis, Mar 10, 2011.

  1. #1
    hi, in this example http://www.atwebresults.com/php_ajax_image_upload/ the form uploads file and respond with uploaded file in iframe.

    How can i add another form on the page with text input value to be the path of uploaded file or read result from outputed iframe content.

    Thanks
     
    dramiditis, Mar 10, 2011 IP
  2. Tanya Roberts

    Tanya Roberts Active Member

    Messages:
    250
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    75
    #2
    Hi,
    You cannot get the data from a iframe unless the frame matches your domain. i.e. if your website is http://www.example.com then you can only change and fetch the content from the frame if you frame source is similar to http://www.example.com/upload.php

    This is type of browser security that all the browser must have, they have it. Try "Firebug" on "Firefox" and check what is the error, and why doesn't it works.
     
    Tanya Roberts, Mar 16, 2011 IP
  3. srisen2

    srisen2 Peon

    Messages:
    359
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    iframes are being decomissioned with html5 you should seriously consider not using them
     
    srisen2, Mar 18, 2011 IP