Click to See Complete Forum and Search --> : How to read value from IFRAME to HTML page.
I have IFRAME element placed on HTML page. This IFRAME uses navigate method to ASP page and displays this ASP
page which aventually would be hidden.
I need to read some elements value from this ASP page to
this parent(?) HTML page elements.Say,
HTMLpage.formName.elementName.elementValue=
ASPpage.formName.elementName.elementValue
What would be right way to do that?
I tried to use
document.all.frames["MyIFrame"].document.all
to read values, but it did not work.
sebs
Jan 11th, 2001, 07:21 AM
parent.frames.document.yourFormName.yourElement.value=...
But how do I see an element which is inside IFRAME?
IFRAME consists of ASP page with a form.
sebs
Jan 11th, 2001, 08:20 AM
ok but after an asp page is request,it generate html or javascript,
so you do the same!
parent.frames.document.yourFormName.yourElement.value=...
and what do u mean by IFRAME, what the I stand for??
Clunietp
Jan 11th, 2001, 10:09 AM
document.all.iframename will get you access to the contents of the iframe
You might get "permission denied" when trying to access an iframe's contents. I think it has something to do with cross frame scripting or something....
I've tried document.all.IFRAMEname as well as
document.all.htmlIFRAMEname.document.all.ASPelementName.valu
It should have given me value of the element inside of ASP page, but instead it gives me a values on a parent
HTML page providing if I have a named objects on this page.Looks like it always redirects me back to parent HTML page and did not read anything inside of IFRAME despite that ASP page loads with no problems.
Clunietp
Jan 11th, 2001, 10:33 AM
Tough break, I've had trouble in the past trying to access the document in an IFRAME.....I don't think I ever got around it either....
Clunietp,
Here is the way I found if ever need it.
Instead of accessing values from parent to IFRAME,
which seems to be impossible despite MSDN insisting on it,
I assign values from child form to parent:
<body onload="
parent.document.form.element.value=form.element.value;">
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.