Solved

Calling javascript function from child iframe

Posted on 2004-09-20
6
1,426 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
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…

734 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