homepage Welcome to WebmasterWorld Guest from 54.167.10.244
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
How to call from iframe?
liwei




msg:1494819
 1:43 pm on Jun 1, 2003 (gmt 0)

I have a.htm with an iframe(b.htm) in it.
There is a function called "up" in a.htm
If I want to call function "up" from b.htm, how should I write the code?

For example:

<body onload="xxx.up()">

 

korkus2000




msg:1494820
 5:00 pm on Jun 1, 2003 (gmt 0)

have you tried top.up()?

liwei




msg:1494821
 1:24 am on Jun 2, 2003 (gmt 0)

Thank you!
I tried "parent.up()", it works. I think it's same as "top.up()".

korkus2000




msg:1494822
 1:31 am on Jun 2, 2003 (gmt 0)

parent will work also. I like using top because it is an absolute path to a frame. I start out at the root then move to my target. parent is relative and can make a frame system hard to understand. It is personal preference. Glad it works. :)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved