Solved

Calling javascript function from child iframe

Posted on 2004-09-20
6
1,420 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Jquery form 9 38
Javascript Regex 7 20
How to single quote a check box id using java script before using document.GetElementById ? 9 27
Html date format 9 20
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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…

680 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