Friday, February 25, 2011

How to set iframe content controls value from Parent page

hi guys following sample will help for set iframe content controls value from Parent page

Parent page
-----------

..body onload="setiframevalues()"/..

function setiframevalues() {
window.frames[0].document.getElementById('txtname').value = "Welcome";
window.frames[0].document.getElementById('txtname2').value = "Manikandan";

}

iframe calling page Sample
----------------------------

Name
.....input id="txtname" type="text" ...

name2
...input id="txtname2" type="text"...