Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / JavaScript / June 2005



Tip: Looking for answers? Try searching our database.

Passing data back and forth with a ASP.NET IFrame

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kieran Benton - 30 Jun 2005 18:25 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.