469,356 Members | 2,666 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,356 developers. It's quick & easy.

Updating main page with iframe

3
Hello,
I have an iframe inside my main page, this main page has a form with several textareas.
I would like that when I click on a link in my iframe, a text associated with this link would insert into the textarea that has the focus in my main page.

Is this possible? this will be sort of a clipboard facility for my users.

your help is very much appreciated.
thanks
Mar 1 '07 #1
1 1331
Hello,
I have an iframe inside my main page, this main page has a form with several textareas.
I would like that when I click on a link in my iframe, a text associated with this link would insert into the textarea that has the focus in my main page.

Is this possible? this will be sort of a clipboard facility for my users.

your help is very much appreciated.
thanks
If I understand right your problem, in my opinion this is the solution:

<textarea id='mytextarea'></textarea>
<iframe>
<a href="#" onclick=myfunction('this is my text')>mylink</a>
</iframe>
<script>
function myfunction(text)
{
document.parent.getElementById('mytextarea').inner HTML=text;
}
</script>
Mar 2 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Antonio Delgado | last post: by
3 posts views Thread by Guogang | last post: by
reply views Thread by Oswaldo Rod?guez via .NET 247 | last post: by
reply views Thread by Dennis | last post: by
16 posts views Thread by Stevo | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.