Left Module Question |
![]() ![]() |
Left Module Question |
Jun 14 2006, 02:43 PM
Post
#1
|
|
|
Newbie ![]() Group: Member Posts: 8 Joined: Mar 2006 Member No: 385,821 |
Hi, I was trying to put my music player in a left module, and it wasn't working.
I have this code: CODE <script> titleContent = 'music.'; moduleContent = '<!-- begin code provided by createblog.com --> <object id="darkplayer" codeBase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" type="application/x-oleobject" height="0" standby="Loading Microsoft Windows Media Player components..." width="0" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"> <param NAME VALUE> <param NAME="ShowControls" VALUE="0"> <param NAME="ShowStatusBar" VALUE="0"> <param NAME="ShowDisplay" VALUE="0"> <param NAME="DefaultFrame" VALUE="Slide"> <param NAME="Autostart" VALUE="1"> <param NAME="Loop" VALUE="True"> </object> </p> <form name="form"> <p style="text-align: center"> <select style="FONT-SIZE: 7pt; BACKGROUND:#444444; WIDTH: 150; COLOR: #ffffff; font-face: arial; height:174" name="playlist" size="1"> <option value="0"> Fell In Love With A Girl </option> <option value="1"> Romantic Rights </option> <option value="2"> The New Year </option> <option value="3"> Date With The Night </option> <option value="4"> Junior Kickstart </option> <option value="5"> Pressed In A Book </option> <option value="6"> Be Gentle With Me </option> <option value="7"> Concerning The UFO Sighting... </option> <option value="8"> I Have No Sister </option> <option value="9"> Boxcar </option> <option value="10"> Banquet </option> <option value="11"> Circle Square Triangle </option> <option value="12"> Such Great Heights </option> <option value="13"> Parade of Punk Rock T-Shirts </option> <option value="14"> Insistor </option> </select><br> <input TYPE="BUTTON" NAME="darkplay" VALUE="p l a y" OnClick="play(document.forms['form'].playlist);"> <input TYPE="BUTTON" NAME="darkpause" VALUE="p a u s e" OnClick="document.darkplayer.pause(); playstate=2;"> <input TYPE="BUTTON" NAME="darkstop" VALUE="s t o p" OnClick="document.darkplayer.stop(); playstate=2;"></p> </form> <script language="JavaScript"> <!-- var playstate = 1; shuffle = 1; // set to 0 to always play first song in list // set to 1 to randomly choose the first song to play // www.xanga.com/smartypants91780 // unlimited songs, just copy and paste the song line and change the number songs=new Array(); songs[0]=" http://www.mytlsp.net/yinyue/w/whitest/Fell_In_Love_With_A_Girl.mp3" songs[1]="http://audio.sxsw.com/2005/mp3/archive/Death_From_Above_1979-Romantic_Rights.mp3" songs[2]="http://www.vaguespace.net/blog/files/01_the_new_year.mp3" songs[3]="http://www.users.qwest.net/%7Emezoic/yyydwtn.mp3" songs[4]="http://ia200131.eu.archive.org/hdb1/audio/rwb003/rwb003-a1-the_go_team-junior_kickstart.mp3" songs[5]="http://split.org/random/Oh,%20Inverted%20World/10%20-%20Pressed%20in%20a%20Book.mp3" songs[6]="http://audio.sxsw.com/2006/mp3/The_Boy_Least_Likely_To-Be_Gentle_With_Me.mp3" songs[7]="http://aquarium.lipetsk.ru/LJ/music/SufjanStevens2005/01.mp3" songs[8]="http://www.earfood.net/music/OhNo_IHaveNoSister.mp3" songs[9]="http://therosebuds.com/mp3s/rosebuds-boxcar.mp3" songs[10]="http://chris.europe2blog.fr/podcast/blockparty.mp3" songs[11]="http://centralvillage.blogs.com/cv/files/05_circle_square_triangle.mp3" songs[12]="http://www.filelodge.com/files/hdd7/151579/Iron%20and%20Wine%20-%20Such%20Great%20Heights%20%28the%20postal%20service%20cover%29.mp3" songs[13]="http://www.flameshovel.com/mp3/MA04-parade.mp3" songs[14]="http://tapesntapes.com/Insistor.mp3" if (shuffle == 1) { var randsg = Math.floor(Math.random()*songs.length); document.darkplayer.FileName = songs[randsg]; document.darkplayer.scr = songs[randsg]; document.forms['form'].playlist.options[randsg].selected = true; } 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; } //--> </script> <!-- end code provided by createblog.com --> <!-- end code provided by createblog.com -->'; sub = subTitle.parentNode.parentNode.parentNode.parentNode.parentNode sub.insertAdjacentHTML('beforeBegin','<table border="1" cellspacing="0" cellpadding="4" width="100%" class="left"><tr><th valign="top" align="left" class="left">' + titleContent + '</th></tr><tr><td valign="top" class="left">' + moduleContent) sub.insertAdjacentHTML('beforeBegin','<BR>'); </script> I've used the code to add a module before, and it works with the counter I have, but it won't work with this. Is this possible, or did I just do something wrong? Thanks |
|
|
|
Jun 14 2006, 06:32 PM
Post
#2
|
|
![]() You'll find me in your dreams. ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Member Posts: 8,536 Joined: Mar 2005 Member No: 114,010 |
Does no one understand that.... Ahem...
ADJACENT HTML ONLY! Therefore, it all needs to be one line. Which is why it's easier to use this in conjuction with a music player. |
|
|
|
Jun 14 2006, 08:55 PM
Post
#3
|
|
|
Newbie ![]() Group: Member Posts: 8 Joined: Mar 2006 Member No: 385,821 |
OK, thanks for the code. It works, but I can't get it where I want it. It always goes below all of my entries, instead of right below the posting calendar. I've tried changing parts of the code, and nothing worked.
I put this in Website Stats: CODE <!-- Left Side Modules : Paul Chen --> <div id="customLeft" style="display:transparent"> <!-- module:start --> <table class="left" cellSpacing="0" cellPadding="4" width="100%" border="1"> <tr><th class="left" vAlign="top" align="left"> music. </th></tr> <tr><td class="left" vAlign="top"> (music player code here, I took it out to make this shorter) <br/> </td></tr> </table> <br/> <!-- module:end --> </div> <script> var sbpc = document.getElementById('customLeft'); var myForm = document.getElementById('__aspnetForm'); var leftSide = sbpc.cloneNode(true); leftSide.style.display = "block"; if(!document.all){ range = document.createRange(); range.selectNode(myForm); range.insertNode(leftSide);} else{myForm.insertAdjacentElement('afterEnd', leftSide);} </script> <!-- Left Side Modules : Paul Chen --> So is there a way to make it directly below the Posting Calendar, or even better, above My Subscriptions? |
|
|
|
Jun 20 2006, 11:58 AM
Post
#4
|
|
|
Newbie ![]() Group: Member Posts: 8 Joined: Mar 2006 Member No: 385,821 |
Sorry for impatience, but *bump*
|
|
|
|
Jun 21 2006, 06:46 PM
Post
#5
|
|
![]() You'll find me in your dreams. ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Member Posts: 8,536 Joined: Mar 2005 Member No: 114,010 |
You... Can't... -.-U
What is it with people? If the creator doesn't say that it can be done, then the feature must not be implemented! Ta-da... Okay sorry, but really. You can't do everything. If it works at all, you should be happy. (Afterall, it's better than it not working like before.) |
|
|
|
Jun 22 2006, 10:12 AM
Post
#6
|
|
|
Newbie ![]() Group: Member Posts: 8 Joined: Mar 2006 Member No: 385,821 |
OK.
Well thanks anyway |
|
|
|
![]() ![]() |