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
uniquepawanAsked:
Who is Participating?
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.