Solved

Cross Frame (frameset) javascript problem

Posted on 2009-07-05
4
373 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
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…

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now