SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
-
Jun 6, 2006, 07:53 #1
- Join Date
- Jun 2006
- Posts
- 1
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Trying to control a function from a child window
Hi, i'm trying to set up something that seems simple yet is evading me. I have a page that consists of two frames ('top' and 'bottom'). The top frame contains a javascript function that is used to start and stop playing mp3s via a flash file. The music is stopped by a user click using this command:
Code:onClick="MM_callJS('Playa.doStop()')"
Code:Playa.doStop = function() { var p = Playa.__getPlaya(); if (p != null) { p.SetVariable("remoteRequest", "Stop"); } };
I thought this would do it, but it's no good.
Code:<body onLoad="MM_callJS('opener.top.Playa.doStop()">
Thanks,
Chairman Blow
p.s. this mp3 player thing is a nice, simple, customizable feature without all the bulk of some of the others i'd found.... if anyone's interested.
Playa streaming mp3 flash player . Not spamming... i have no affiliation with 'em.
-
Jun 6, 2006, 08:23 #2
- Join Date
- Oct 2001
- Location
- Texas
- Posts
- 96
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
This may work:
opener.top.frames[0].Playa.doStop()Rob Nolan
Do or do not, there is no try.
-
Jun 7, 2006, 08:32 #3
- Join Date
- Dec 2004
- Location
- Canada
- Posts
- 162
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I would have thought the following more likely:
<body onLoad="opener.mytopframesname.MM_callJS('Playa.doStop()">
Bookmarks