iframe question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hey all,
let's say i have a single button on a page which is shown thru an iframe on
my webform. if i press the button that's inside the iframe is there a way to
write text to a textbox that's outside the iframe?

sorry if this doesn't make sense, i guess what i'm asking is there a way to
communicate with the contents of the iframe?

thanks,
rodchar
 
It is a client-side task and you can do it with javascript. An iframe can
access the parent window via it's window's "parent" property.
 
As long as the contents of the IFrame come from the same domain, you could do
it with client script. Something like:

parent.document.getElementById("targetTextBox").value= yourvaluefromIframe;

Peter
 
Back
Top