iframe question

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
 
E

Eliyahu Goldin

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.
 
G

Guest

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
iframe help please 1
button inside the iframe 2
prevent iframe reload at postback 1
How to open a webform in a iframe when with vb.net code 1
onChange from iframe 5
problem with iframe 0
resizing iframe 1

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,201
Latest member
KourtneyBe

Latest Threads

Top