Solved

Cross Frame (frameset) javascript problem

Posted on 2009-07-05
4
387 Views
Last Modified: 2012-05-07
Hi, I am using a soundmanager object in a hidden frame on my site.  In this way, i can have continuous music throughout the navigation.  The problem is with the sound control buttons that i use on the visible frame.

If you go to : www.maharajahsroad.com - and enter the site by clicking through the splashpage. you will land on the INDIA page. You can then click the Off and On buttons at the top to stop the sound.  That works.  But if you then proceed to the video page, and try to click the Off button (or On button), it will no longer work.  If you then go back to the INDIA page, (by clicking on the India Link), the same buttons that worked at the start, no longer work.  I dont know what kind of JS erros are causing this, and I'm pretty vexed over the issue.

please help, THANKS!
IN FRAME2:
function stopmusic(){
 
soundManager.pause('mySound');
	//parent.frames['frame1'].mySwap(14);
		window.alert('The site music has been stopped');
 
}
 
IN FRAME1:
<a href="javascript:parent.frames['frame2'].playmusic();"><img src="images/player_on.gif" id="playerOn" onmouseout="mySwap(4)" onmouseover="mySwap(5)" /></a>
<a href="javascript:parent.frames['frame2'].stopmusic();"><img src="images/player_off.gif" id="playerOff" onmouseout="mySwap(6)" onmouseover="mySwap(7)"/></a>

Open in new window

0
Comment
Question by:nbj622
  • 3
4 Comments
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 500 total points
ID: 24784332
First change

<a href="javascript:parent.frames['frame2'].playmusic();">
and
<a href="javascript:parent.frames['frame2'].stopmusic();">

to

<a href="#" onClick="parent.frames['frame2'].playmusic(); return false">

<a href="#" onClick="parent.frames['frame2'].stopmusic(); return false">
 
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 24784353
It is because you have another flash taking over in the video page
You should stop the music when the user loads video
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 24784360
Erm. I take that back
Works for me in FF 3.5
0
 

Author Closing Comment

by:nbj622
ID: 31599982
Thanks alot.  Its all about moving from the HREF to the ONCLICK with the return false statement.  It makes all the difference.  Such a simple fix for my headache!  thanks again, it all works now.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question