I'm trying to communicate between a parent document that is controlled
through pure Javascript with an embedded IFrame containing an ASP.NET
form. I can quite easily pass data into hidden fields in the IFrame and
submit the form to pass data to the ASP.NET application.
Now the tricky part! (at least for me, probably not for everyone
else!), how can I set a field in the ASP.NET page (using ASP.NET during
a postback), which I can get the value of within the parent Javascript
controlled page?
I'm at a loss!
Danny - 28 Jun 2005 22:51 GMT
I don't know .net, so, what you need may not be a biggie but your
explanation seems a bit skimpy or a bit vague, unless is .net bound.
Danny
> I'm trying to communicate between a parent document that is controlled
> through pure Javascript with an embedded IFrame containing an ASP.NET
[quoted text clipped - 7 lines]
>
> I'm at a loss!

Signature
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Michel de Becdelièvre - 30 Jun 2005 21:04 GMT
"Kieran Benton" <kieranbenton@fastmail.fm> a écrit dans le message de news:
> Now the tricky part! (at least for me, probably not for everyone
> else!), how can I set a field in the ASP.NET page (using ASP.NET during
> a postback), which I can get the value of within the parent Javascript
> controlled page?
Define a DoSomething function with a parameter in the parent window.
Use the onload event of the body(client side) to run a bit of javascript
that will call something like that :
...
<script type ="text/javascript">
function FinChargement() {
var val = document.getElementById("iptCachee").value;
window.parent.DoSomething( val );
}
</script>
</head>
<body onload="FinChargement()">
<form id="formCachee" method="post" runat="server">
<input id="iptCachee" type="hidden" runat="server">
</form>
....
cosmic fool - 01 Jul 2005 00:55 GMT
> I'm trying to communicate between a parent document that is controlled
> through pure Javascript with an embedded IFrame containing an ASP.NET
[quoted text clipped - 7 lines]
>
> I'm at a loss!
try,
window.parent.document.getElementById("something")
or
window.top...blah blah
or
window.parent.somefunctionname()
ok?
ok.