Re: Passing data back and forth with a ASP.NET IFrame
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: Passing data back and forth with a ASP.NET IFrame

From: Michel de Becdelièvre <m_debec@msn.com>
Date: Thu Jun 30 2005 - 22:04:06 CEST

"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>
....
Received on Tue Oct 18 02:50:32 2005