1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Populating a text field in an iFrame

Discussion in 'General Programming Chat' started by kimkils, Jun 28, 2009.

  1. kimkils

    kimkils Power Member

    Joined:
    Jan 10, 2009
    Messages:
    663
    Likes Received:
    225
    I have been trying to populate a text field within a page in an iframe on a page, i can do it fine normally, but when it is on a different domain it doesnt let me.

    Its a security issue but is there a way around it? I have googled it but cant find any solid examples, can anybody help? WOuld really appreciate it, thanks. :)
     
  2. grazor

    grazor Registered Member

    Joined:
    Apr 14, 2009
    Messages:
    57
    Likes Received:
    19
    there are a few solutions to this, they involve ajax calls. Read this and see if you get any ideas. hxxp://www.ibm.com/developerworks/library/wa-aj-jsonp1/
     
  3. kimkils

    kimkils Power Member

    Joined:
    Jan 10, 2009
    Messages:
    663
    Likes Received:
    225
    Thanks for the reply, i appreciate it grazor.

    I've had a read now and im at about 25% understanding, will look over it again until i grasp it better, i had found some reading on the internet but this is a little better.
     
  4. kimkils

    kimkils Power Member

    Joined:
    Jan 10, 2009
    Messages:
    663
    Likes Received:
    225
    It's a little over my head :(

    If you would be willing to throw together a quick bit of demo code i would HIGHLY appreciate it and +rep and swap software(?) or give you my cookie stuffing script i (semi) designed. Oh and mucho love forever ;)
     
  5. kimkils

    kimkils Power Member

    Joined:
    Jan 10, 2009
    Messages:
    663
    Likes Received:
    225
    Ok... after further investigation... i can use prepop email submits so dont need to fill in the email field i can just populate it from a variable in the url.

    What i need to do however is submit the form, ive found this link which helps but i get errors when trying to get it to work.

    The errors are "Not Acceptable

    An appropriate representation of the requested resource /1.php could not be found on this server." - After a search this seems to point to a Mod Security issue but i disabled it and the hosting then doesnt work at all - any suggestions???? :confused::confused::confused: