[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1442
  • Last Modified:

Calling javascript function from child iframe

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
uniquepawan
Asked:
uniquepawan
1 Solution
 
ZylochCommented:
Hi uniquepawan,

Try using

parent.functionName(parameter);

Regards,
Zyloch
0
 
mlpk_tyrCommented:
hi,

try this,

since both frames are in a single window,

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


hope this helps,
mlpk_tyr
0
 
ZylochCommented:
mlpk, don't you mean window.frames['framename']?
0
 
oddersCommented:
yeah, ive been using parent.function(); quiet a bit and works welll in many browsers.
0
 
James RodgersWeb Applications DeveloperCommented:
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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now