|
|
|||||||
| About Us | Register | FAQ | Members List | Calendar | Mark Forums Read |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Registered User
![]() ![]() ![]() ![]() Join Date: Aug 2001
Location: The land of Insanity
Posts: 571
|
HTML prolem with streaming midi file
Okay, I have a set of midis I want the user of this page to be able to pick thriough, kinda like a jukebox. I have a dropdown box with the song names and the values are the paths to the files, relative to the page's location on my server... like this:
Code:
[option value="path/to/file1.mid"]Song name 1[/option] [option value="path/to/file2.mid"]Song name 2[/option] [option value="path/to/file3.mid"]Song name 3[/option] ... [option value="path/to/file10.mid"]Song name 10[/option] Is there a way to do this? Should I use something else besides the [embed] tag? Does this work in all the major browsers? And yes, I know you have to use the > and < characters for html tags, but they screw my post up
|
|
|
|
|
|
#2 (permalink) |
|
Registered User
![]() ![]() ![]() ![]() ![]() Join Date: Sep 2002
Location: St Andrews, Scotland
Posts: 1,575
|
Re: HTML prolem with streaming midi file
Maybe somebody could clarify this but I'm sure that it would be possible with JavaScript.
Perhaps with: Code:
embeddedclib.src = formselection.value;
__________________
OS: Arch Linux w/ Kernel 2.6.23.8 + GNOME 2.20.1 - CPU: Intel Pentium M 1.5GHz - Memory: 1280MB DDR PC2700 - Browser: Mozilla Firefox 2.0.0.10 |
|
|
|
|
|
#3 (permalink) |
|
Registered User
![]() ![]() ![]() ![]() Join Date: Aug 2001
Location: The land of Insanity
Posts: 571
|
Re: HTML prolem with streaming midi file
That gets it to play the defualt selected item on the menu, but it doesn't make it play the file I select.
__________________
Computer Specs: ASUS A8N SLI Deluxe (nForce4) | AMD Athlon X2 3800 @ 2.0ghz | 2x1.0GB OCZ Platinum DDR400 RAM (128-bit DDR mode) | GeForce 7600 w/ 256mb VRAM | Onboard Sound - for now OS1 : Windows XP / SP2 | Direct X 9 OS2 : Gentoo Linux 2006.0 OS3 : Windows Vista Beta 2 ePSXe config: Pete's OpenGL 2.0 | Eternal SPU 1.4 | ePSXe Internal CD core (W2K) Project 64 config Jabo's D3D7 1.5 | Jabo's DSound 1.5 | Jabo's DInput 1.5 |
|
|
|
|
|
#4 (permalink) |
|
Registered User
![]() ![]() ![]() ![]() ![]() Join Date: Sep 2002
Location: St Andrews, Scotland
Posts: 1,575
|
Re: HTML prolem with streaming midi file
Yeah, but if you add that to the "onchange" property it should change.
__________________
OS: Arch Linux w/ Kernel 2.6.23.8 + GNOME 2.20.1 - CPU: Intel Pentium M 1.5GHz - Memory: 1280MB DDR PC2700 - Browser: Mozilla Firefox 2.0.0.10 |
|
|
|
|
|
#5 (permalink) |
|
Registered User
![]() ![]() ![]() ![]() Join Date: Aug 2001
Location: The land of Insanity
Posts: 571
|
Re: HTML prolem with streaming midi file
So something like this?
Code:
[select name="songlist" id="songlist" onChange=embed.src= document.form1.songlist.selectedIndex.value;]
__________________
Computer Specs: ASUS A8N SLI Deluxe (nForce4) | AMD Athlon X2 3800 @ 2.0ghz | 2x1.0GB OCZ Platinum DDR400 RAM (128-bit DDR mode) | GeForce 7600 w/ 256mb VRAM | Onboard Sound - for now OS1 : Windows XP / SP2 | Direct X 9 OS2 : Gentoo Linux 2006.0 OS3 : Windows Vista Beta 2 ePSXe config: Pete's OpenGL 2.0 | Eternal SPU 1.4 | ePSXe Internal CD core (W2K) Project 64 config Jabo's D3D7 1.5 | Jabo's DSound 1.5 | Jabo's DInput 1.5 |
|
|
|
|
|
#6 (permalink) |
|
I Need a Weapon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Oct 2001
Location: Omaha, NE
Posts: 4,318
|
Re: HTML prolem with streaming midi file
Just to clarify, MIDI doesn't stream.
Although I think I see your problem. selectedIndex and value are two different properties of the SELECT element. selectedIndex returns the ordinal position of a selected OPTION element within the SELECT tag. value will return the value of the currently selection OPTION element within the SELECT tag.Try changing what you have above to this: Code:
[select name="songlist" onChange="embed.src=this.value;"]
__________________
.: Flaretech.Net :: Flaretech.Biz Web Hosting :: H3 Stats :: My Blog :.
![]() .: Mac Pro :: Dual Quad-Core Intel Xeon 5400s :: 6 GB 800MHz DDR2 ECC FB-DIMMs :: NVIDIA GeForce 8800 GT 512 MB GDDR3 :. .: Macbook Pro 17" :: 2.33 GHz Intel Core 2 Duo :: 2 GB 667 MHz DDR2 :: ATI Radeon X1600 :. .: Home Server :: 2.41 GHz AMD Opteron 180 :: 4 GB DDR400 :: Windows Server 2003 Enterprise R2 :. |
|
|
|
|
|
#7 (permalink) |
|
Registered User
![]() ![]() ![]() ![]() Join Date: Aug 2001
Location: The land of Insanity
Posts: 571
|
Re: HTML prolem with streaming midi file
Code:
[!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"]
__________________
Computer Specs: ASUS A8N SLI Deluxe (nForce4) | AMD Athlon X2 3800 @ 2.0ghz | 2x1.0GB OCZ Platinum DDR400 RAM (128-bit DDR mode) | GeForce 7600 w/ 256mb VRAM | Onboard Sound - for now OS1 : Windows XP / SP2 | Direct X 9 OS2 : Gentoo Linux 2006.0 OS3 : Windows Vista Beta 2 ePSXe config: Pete's OpenGL 2.0 | Eternal SPU 1.4 | ePSXe Internal CD core (W2K) Project 64 config Jabo's D3D7 1.5 | Jabo's DSound 1.5 | Jabo's DInput 1.5 |
|
|
|
|
|
#8 (permalink) |
|
Registered User
![]() ![]() ![]() ![]() ![]() Join Date: Sep 2002
Location: St Andrews, Scotland
Posts: 1,575
|
Re: HTML prolem with streaming midi file
The JavaScript should use the name of your object.
Code:
embed.src=songlist.value;
__________________
OS: Arch Linux w/ Kernel 2.6.23.8 + GNOME 2.20.1 - CPU: Intel Pentium M 1.5GHz - Memory: 1280MB DDR PC2700 - Browser: Mozilla Firefox 2.0.0.10 |
|
|
|
|
|
#9 (permalink) |
|
Registered User
![]() ![]() ![]() ![]() Join Date: Aug 2001
Location: The land of Insanity
Posts: 571
|
Re: HTML prolem with streaming midi file
Doesn't work. is it supposed to be quoated? (like I have it)
__________________
Computer Specs: ASUS A8N SLI Deluxe (nForce4) | AMD Athlon X2 3800 @ 2.0ghz | 2x1.0GB OCZ Platinum DDR400 RAM (128-bit DDR mode) | GeForce 7600 w/ 256mb VRAM | Onboard Sound - for now OS1 : Windows XP / SP2 | Direct X 9 OS2 : Gentoo Linux 2006.0 OS3 : Windows Vista Beta 2 ePSXe config: Pete's OpenGL 2.0 | Eternal SPU 1.4 | ePSXe Internal CD core (W2K) Project 64 config Jabo's D3D7 1.5 | Jabo's DSound 1.5 | Jabo's DInput 1.5 |
|
|
|
|
|
#10 (permalink) | |
|
I Need a Weapon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Oct 2001
Location: Omaha, NE
Posts: 4,318
|
Re: HTML prolem with streaming midi file
Quote:
__________________
.: Flaretech.Net :: Flaretech.Biz Web Hosting :: H3 Stats :: My Blog :.
![]() .: Mac Pro :: Dual Quad-Core Intel Xeon 5400s :: 6 GB 800MHz DDR2 ECC FB-DIMMs :: NVIDIA GeForce 8800 GT 512 MB GDDR3 :. .: Macbook Pro 17" :: 2.33 GHz Intel Core 2 Duo :: 2 GB 667 MHz DDR2 :: ATI Radeon X1600 :. .: Home Server :: 2.41 GHz AMD Opteron 180 :: 4 GB DDR400 :: Windows Server 2003 Enterprise R2 :. Last edited by ShADoWFLaRe85; October 1st, 2003 at 06:59. |
|
|
|
|
|
|
#11 (permalink) |
|
Registered User
![]() Join Date: Jul 2003
Location: Los Angeles
Posts: 53
|
Re: HTML prolem with streaming midi file
It's safer imho to use "this.options[this.selectedIndex].value".
The problem is I think you need to restart the embed... What I would do is use innerHTML - basically. You would just say divsection.innerHTML = 'new embed';, which would - in theory - start new music. -[Unknown] |
|
|
|
|
|
#12 (permalink) |
|
Registered User
![]() ![]() ![]() ![]() Join Date: Aug 2001
Location: The land of Insanity
Posts: 571
|
Re: HTML prolem with streaming midi file
I've never seen that before... can you please provide a basic example? Basically I just want to figure out where to put it in the HTML document, how to reference it, and where to reference it from.
Edit: I got it! [Unknown], You are a Genius!! I ended up having to do some basic js functions though, made things easier to deal withThanks for the help!
__________________
Computer Specs: ASUS A8N SLI Deluxe (nForce4) | AMD Athlon X2 3800 @ 2.0ghz | 2x1.0GB OCZ Platinum DDR400 RAM (128-bit DDR mode) | GeForce 7600 w/ 256mb VRAM | Onboard Sound - for now OS1 : Windows XP / SP2 | Direct X 9 OS2 : Gentoo Linux 2006.0 OS3 : Windows Vista Beta 2 ePSXe config: Pete's OpenGL 2.0 | Eternal SPU 1.4 | ePSXe Internal CD core (W2K) Project 64 config Jabo's D3D7 1.5 | Jabo's DSound 1.5 | Jabo's DInput 1.5 Last edited by Archlyn; October 1st, 2003 at 17:15. |
|
|
|
|
|
#13 (permalink) |
|
Registered User
![]() Join Date: Jul 2003
Location: Los Angeles
Posts: 53
|
Re: HTML prolem with streaming midi file
<script type="text/javascript" language="Javascript"><!--
function playSong(songName) { document.all.song.innerHTML = "embed crap"; } // --></script> <select onchange="playSong(this.options[this.selectedIndex].value);"> <option value="http://www.songs.com/cool_song.mid">Cool Song</option> </select> <div id="song"></div> -[Unknown] |
|
|
|
|
|
#14 (permalink) |
|
Registered User
![]() ![]() ![]() ![]() Join Date: Aug 2001
Location: The land of Insanity
Posts: 571
|
Re: HTML prolem with streaming midi file
ROFL! That's exactly the way I ended up doing it. I just didn't get around to posting it til now. Thanks for the assist
__________________
Computer Specs: ASUS A8N SLI Deluxe (nForce4) | AMD Athlon X2 3800 @ 2.0ghz | 2x1.0GB OCZ Platinum DDR400 RAM (128-bit DDR mode) | GeForce 7600 w/ 256mb VRAM | Onboard Sound - for now OS1 : Windows XP / SP2 | Direct X 9 OS2 : Gentoo Linux 2006.0 OS3 : Windows Vista Beta 2 ePSXe config: Pete's OpenGL 2.0 | Eternal SPU 1.4 | ePSXe Internal CD core (W2K) Project 64 config Jabo's D3D7 1.5 | Jabo's DSound 1.5 | Jabo's DInput 1.5 |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|