Any Website Makers here? Question... - by 37637598
addink on 16/9/2008 at 00:30
Also: There is no function GetElementById. You need getElementById (lowercase 'g'). :p
Seconded on the FireFox, Opera* advice.
*) I'm not a big fan of using Opera for development, but anything is better than IE when it comes to developing in JavaScript.
Nameless Voice on 16/9/2008 at 00:39
Oh, right. Spotted the one mistake, didn't notice the second. :o
(I knew I should have looked up a script where I'd used it to make sure I had it right...)
Also, Opera's developer tools have been improved a lot in the latest versions (despite whatever else I might say about them). Firefox is more strict about some JavaScript issues, though.
37637598 on 16/9/2008 at 03:34
Thanks! That helped me out a ton! I am still experiencing a problem and have come to the conclusion that it's impossible to change the song that's playing within a media player via javascript.
I've even tried using a 'replace html' function...
The function script:
Code:
script type="text/javascript"
var songfile = "param name="FileName" value="ANOTHERRAINYDAY.mp3"";
function update(){
document.getElementById('Song').innerHTML = "songfile";
}
/script
The button to control it all:
Code:
a href="javascript:;" onclick='update()'>Another Rainy Day/a
The object:
Code:
********
classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" data="123456"
type="application/x-oleobject" width=380 height=50 align="middle"
standby="Loading Microsoft® Windows® Media Player components..." id="MediaPlayer1">
span id="Song">param name="FileName" value="ANOTHERRAINYDAY.mp3">/span>
param name="AutoStart" value="True">
param name="ShowStatusBar" value="True">
param name="DefaultFrame" value="mainFrame">
param name="PlayList" value="Enable">
embed src="ANOTHERRAINYDAY.mp3" width="380" height="50" autostart="True" align="middle" showstatusbar="True" defaultframe="mainFrame" playlist="Enable">/embed>
****** BEGIN PLUG-IN HTML FOR FIREFOX-->
****** END PLUG-IN HTML FOR FIREFOX-->
/object>
I got rid of the <'s cuz they were causing problems... Sorry if I'm screwing anything up by posting this stuff, let me know before banning me! :P