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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

iframe 3
button inside the iframe 2
iframe help please 1
prevent iframe reload at postback 1
Alternet to iframe?? 6
Need help with IFrame callback 1
iframe question 1
resizing iframe 1

Back
Top