SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
-
Jan 22, 2001, 16:40 #1
I've got a javascript function in one frame that I would like to access from another frame. Is this possible?
-
Jan 22, 2001, 16:45 #2
- Join Date
- Jul 1999
- Location
- SC, USA
- Posts
- 390
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hey,
It's very possible. To access a frame, you go:
parent.frameName
and change frameName to the name of the frame you want to access. So, to access a function in anothe frame, just use:
parent.frameName.window.functionName()
and change functionName() to the name of your function.
Hope that helps,
aDogModerator at www.javascriptcity.com/forums/
-
Jan 22, 2001, 16:51 #3
Thanks for the info aDog, but how do I actually use a link to call the function?
-
Jan 22, 2001, 18:04 #4
- Join Date
- Jul 1999
- Location
- SC, USA
- Posts
- 390
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hey,
You'd just go:
Code:<a href="javascript:parent.frameName.window.functionName()">Other Frame Function</a>
<Edited by kyank on 01-23-2001 at 07:07 PM>Moderator at www.javascriptcity.com/forums/
Bookmarks