•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 361,911 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,610 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 1273 | Replies: 11
![]() |
•
•
Join Date: Dec 2004
Location: Lincoln Park, Michigan
Posts: 1,744
Reputation:
Rep Power: 7
Solved Threads: 106
I'm sifting through your HTML and one area that firefox spots as a problem is here (near the bottom):
The Problem there, is that after the alt you use ' instead of ", so when you use Galacticwebdesign's (problem with ' in design's) it throws the html out of whack, so try this:
That's not going to fix your problem, but it's something I spotted. The same thing goes on (which is probably why firefox doesn't play it) in your javascript for the play button:
The key to understanding this, is that in programming everything you open, you must also close. Here, you close what is opened, but before it's due time. Look at the onclick portion of the code here. You open the javascript statement with '. Then you get to the document.forms[ and you close the first ' with another '. Try this:
Now onto your play function.
Ok, so if playstate is not equal to 2, then it sets snum to the song selected, set's the players filename and src properties, but uh, where does it tell the player to play again?
<img src='http://www.galacticwebdesigns.com/topsites/button.php?u=eltommyo' alt='Galacticwebdesigns's TopSites List' border='0' />
<img src='http://www.galacticwebdesigns.com/topsites/button.php?u=eltommyo' alt="Galacticwebdesigns's TopSites List" border='0' />
<input TYPE='BUTTON' NAME='darkplay' VALUE='Play!' OnClick='play(document.forms['form'].playlist);'>
The key to understanding this, is that in programming everything you open, you must also close. Here, you close what is opened, but before it's due time. Look at the onclick portion of the code here. You open the javascript statement with '. Then you get to the document.forms[ and you close the first ' with another '. Try this:
<input TYPE='BUTTON' NAME='darkplay' VALUE='Play!' OnClick="play(document.forms['form'].playlist);">
function play(list)
{
if (playstate == 2) {
document.darkplayer.Play();
} else {
var snum = list.options[list.selectedIndex].value
document.darkplayer.FileName = songs[snum];
document.darkplayer.scr = songs[snum];
}
playstate = 1;
}![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
- Word Association Game (Posting Games)
- Windows 2000 pro - svchost.exe using 100% cpu (Windows NT / 2000 / XP / 2003)
- Can't get samba to work! (*nix Software)
- finding area of something (Computer Science and Software Design)
- Internet explorer problems (Web Browsers)
- Where were you when the power went out? (Geeks' Lounge)
- Memory Managers (Windows 9x / Me)
- Meaningless pat on the back, but... (Geeks' Lounge)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: My Questions
- Next Thread: scrolling images



Linear Mode