How to insert text into a text area within an iframe.
Hi,
I have a page within which is an iframe, and within that iframs is a text area.
I need to be able to insert text into that text area from the mother page.
I have tried to insert it with the following code but it's not working :
I've tried to use your code with both the javascript link and the button, and it hasn't worked for me.
The textarea is indeed the only one in the iframe so that can't be an issue.
I've tried to use your code with both the javascript link and the button, and it hasn't worked for me.
The textarea is indeed the only one in the iframe so that can't be an issue.
Did you name the iframe - inner1? name='inner1'
I loaded a page into an iframe, with one textarea, and was able to manipulate it from the page with the iframe, as shown, in ie7, ie8, ff3.5, the latest Google and Safari. So, I don't know.
You've got that innerHTML on the left side of the equals sign?
Thanks for the helpful post, I feel like a moron for the textarea thing btw, but that's what you get when you try to code with 3 hours sleep ><
However, it's still not working. Recounted, tried every number from 0 to 15 in case i was missing something, tried to revert to grabbing it through id, but nothing goes.
Here's the thing. Javascript locks out - cross-site - scripting. These have to be YOUR pages, on your server.
They are, right? I tested by downloading the page, and using that, instead. I have scripts of my own, on my own sites, that do a great deal of modification to pages loaded into iframes. But they are all pages on my server.
That would explain the issue. They are "my" pages (per se, i'm doing this as part of my job for a company), but they're on 2 different servers. The idea being to imbed a page that uses PHP in a page from a server that doesn't.
At least i've got that cleared up and i can stop banging my head against the wall now. Thanks a lot for your help.
Edit : I've checked with the page on the same server, and obviously it works. I need to find some other way to do what i want.