Edit iFrame Input Fields

i would like to edit form fields in iframe and also insert values in those input fields using javascript… is there any way to do this?

Presuming that the holding page and the iframe page are on the same server, yes, you can communicate between the two using JS, you should first search on the Javascript forum for your problem, then ask around on there if you cannot find anything.

Ask a moderator to move this thread if you like.

Thanks. i’ve found one solution to get contents from iframe…
It works fine while getting contents from local . but its not working for website because of permission problem

<script type=“text/javascript”>
function getContentFromIframe(iFrameName)
var myIFrame = document.getElementById(iFrameName);
var content = myIFrame.contentWindow.document.body.innerHTML;
alert('content: ’ + content);

<input type=‘button’ onclick=“getContentFromIframe(‘Iframe_links’)” value=‘Click’ name=‘sub’ />
<br />
<iframe src=“http://localhost/test/test.php” frameborder=‘0’ width=‘100%’ height=‘100%’ scrolling=‘auto’ style=‘display:block;border:0px;overflow:scroll;’ id=‘Iframe_links’ name=‘Iframe_links’> </iframe>

Are the two documents on the same server, like Cups mentioned?

If not, this won’t work.

No both documents are in the different server… thats the problem … is there any other way to access from different server…

Well, you could load the other page using PHP (file_get_contents() or similar), and then incorporate the returned results into your html/ javascript some way.