Solved

Calling javascript function from child iframe

Posted on 2004-09-20
6
1,415 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
ID: 12100007
Hi uniquepawan,

Try using

parent.functionName(parameter);

Regards,
Zyloch
0
 
LVL 1

Expert Comment

by:mlpk_tyr
ID: 12100140
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
ID: 12100162
mlpk, don't you mean window.frames['framename']?
0
 
LVL 3

Expert Comment

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

Expert Comment

by:James Rodgers
ID: 12697300
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…

914 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

19 Experts available now in Live!

Get 1:1 Help Now