Solved

Cross Frame (frameset) javascript problem

Posted on 2009-07-05
4
394 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

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-…
In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
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…

738 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