Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > IFrame problem.

Thread Tools

IFrame problem.

Posts: n/a
I have a webpage "WebForm1.aspx" that have a IFrame page "IFrame.aspx".
I know that I can access the IFrame.asax 's controls by jscript in
(ex) document.frames("IFrame").document.all.txtExample. value = 'ss';

Now I want to access jscript in "WebForm1.aspx" from "IFrame.aspx".
Is there any way to do it?
(Especially, I want to change the textbox in "WebForm1.aspx" when a
button event in
"IFrame.aspx" occurs.)
Please Help me out. T.T

Reply With Quote
Josh Twist
Posts: n/a
This should do the trick.

window.parent.document.all.txtExample.value = 'ss';

I should point out that you're following an IE only route at the
moment. Maybe try these cross-browser compatible examples instead.

window.frames("IFrame").document.getElementById('t xtExample').value =
window.parent.document.getElementById('txtExample' ).value = 'ss';

Hope that helps


Reply With Quote
Posts: n/a
Thanks a lot.
It will help me a lot.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
form have 2 iframe.problem to input text in other iframe elca Python 0 10-21-2009 10:00 AM
how to use an iframe as a link (make the whole iframe clickable) mi HTML 4 05-21-2008 10:13 PM
Targeting a parent iframe from a sub-iframe HTML 0 11-15-2006 04:40 PM
IFRAME - Refresh Table on Parent Window - maintain IFRAME State Scott ASP General 6 04-14-2004 05:48 AM
Get form values from iframe (1) to iframe (2) inside a layer in iframe (1) Daedalous Javascript 3 01-16-2004 11:08 AM