[ciapug] grab form value from iframe document

Barry Von Ahsen barry at vonahsen.com
Wed Jul 20 14:06:27 CDT 2005


I want to grab a form value from a form in an iframe document (in the 
same domain, I'm not up to any xss shenanigans)

this doesn't work:
<script language="javascript">
function getIFrameVal() {
	oIFrame = document.getElementById('iframeID');
	val = oIFrame.document.frmID1.fieldname.value;
	alert(val);
}
</script>
nor does it work if I remove document from oIFrame.document.frmID1...

can I do this?

-barry




More information about the ciapug mailing list