Solved

Calling javascript function from child iframe

Posted on 2004-09-20
6
1,413 Views
Last Modified: 2008-01-09
Hi All,
      I need the answer to this question as soon as possible. It will be really great if someone reply to it quickly.
The question is as follows-
I have two iframes (say 1 & 2). The iframe 2 is inside iframe 1. There is a javascript function doSettings(user) inside iframe 1. I wanted to call this function from iframe 2 with the username as argument. Also, the iframe 1 is reloaded every 1 second.

thanks in advance,
uniquepawan
0
Comment
Question by:uniquepawan
6 Comments
 
LVL 36

Accepted Solution

by:
Zyloch earned 125 total points
Comment Utility
Hi uniquepawan,

Try using

parent.functionName(parameter);

Regards,
Zyloch
0
 
LVL 1

Expert Comment

by:mlpk_tyr
Comment Utility
hi,

try this,

since both frames are in a single window,

window.frames{'framename'}.callthefunction()


hope this helps,
mlpk_tyr
0
 
LVL 36

Expert Comment

by:Zyloch
Comment Utility
mlpk, don't you mean window.frames['framename']?
0
 
LVL 3

Expert Comment

by:odders
Comment Utility
yeah, ive been using parent.function(); quiet a bit and works welll in many browsers.
0
 
LVL 25

Expert Comment

by:James Rodgers
Comment Utility
No comment has been added to this question in more than 21 days, so it is now classified as abandoned..
I will leave the following recommendation for this question in the Cleanup topic area:

Accept : Zyloch {12100007}

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

Jester_48
EE Cleanup Volunteer
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now