View Full Version : Forms: Select Stream, Play Without Changing FF Page

07-29-2006, 07:16 PM
N: CodingForums
P: htmlpass

I've included an "Entertainment" bar on the top menu for memebers to select a radio or television broadcast stream. The problem I have is that FF will try to load a browser page with the stream's URL. I don't want this to happen. In IE, of coarse, there's no problem with this.


<form name="stream">
<select name="menu" style="font-size:9px; font-weight:normal;">
<option value="javascript:void(0);" title="Please Select">Entertainment</option>
<option value="javascript:void(0);">............</option>
<option value="javascript:void(0);">~ MUSIC ~</option>

<!--// ##### MUSIC ##### //-->
<option value="http://kjzz.org:8080/livestream/connect.asx">Jazz: 91.5 KJZZ</option>
<option value="http://a1446.l1996646747.c19966.g.lm.akamaistream.net/D/1446/19966/v0001/reflector:46747">Rock: 94.1 KZRR</option>
<option value="http://www.club977.com/club977.asx">80s: Club .977</option>

<!--// ##### TALK RADIO ##### //-->
<option value="javascript:void(0);"></option>
<option value="javascript:void(0);">~ TALK RADIO ~</option>
<option value="http://www.npr.org/dmg/dmg.php?getProgramStream=true&NPRMediaPref=WM&sauid=U338850561152969963078&getUnderwriting=1&mswmext=.asx"> National Public Radio</option>

<!--// ##### TELEVISION ##### //-->
<option value="javascript:void(0);"></option>
<option value="javascript:void(0);">~ TELEVISION ~</option>
<option value="mms://">News: Santiago, Chile</option>
<option value="http://streaming.entelchile.net/canal13">Channel 13: Santiago, Chile</option>
<option value="mms://tfmi-wmt.gekimedia.net/tfmi-channel">Japanese MTV!</option>
<option value="http://www.rambler-audio.ru/asx/video/rambler-tv.asx">Russian TV</option>

<!--// ##### MISC. ##### //-->
<option value="javascript:void(0);"></option>
<option value="javascript:void(0);">~ INFORMATION ~</option>
<option value="http://www.bloomberg.com/streams/video/LiveBTV200.asxx">Bloomberg Financial</option>
<option value="http://www.nasdaq.com/about/marketsitetowervideo.asx">NASDAQ</option>

</select><input type="button"
style="height:18px; width:30px; font-family:verdana; font-size:9px;"

07-29-2006, 09:47 PM
AS much as I hate to say it, try using an <iframe>.

Look you're changing the location object, why shouldn't that change where you tell it to. IE is just treating it as a special case. Don't blame Firefox for not supporting IE's special behavior.

07-30-2006, 12:13 AM
Well, isn't there some hack to get FF to stand still on these clicks? Like using javascript:void(0); instead of # in standard links...

*edit* and are you thinking of targeting an iFrame? Maybe a 1px x 1px sized one?

07-30-2006, 12:39 AM
*shrugs* I don't use multimedia.

Actually an <object> element might be better suited.

Targeting an iframe might work. Actually I was thinking of use the JavaScript to change the location of an iframe to the stream's URL.

07-30-2006, 12:41 AM
Well in IE, the selection automatically brings up the media player. It does the same for FF, but FF will load a blank page (with the stream's URL) first. Then I have to click the back button to get back on the page.

07-30-2006, 06:22 AM
It works for me in FF1.0.5. It opens the Open/Save As dialog box without opening a blank page.

07-30-2006, 06:30 AM
Wow. Can you save streaming content, glenn? Which link did you try, and do you not have something to play streaming media?

07-30-2006, 06:36 AM
I tried the link you posted in your first post. I have windows media player. FF is actually asking me if I want to open the streaming media in windows media player or save it, you know, the standard File Open/Save dialog box.

07-30-2006, 06:38 AM
Have you logged into the site and tried to select the content from the form? I'm thinking you just pulled the URL from the code above and tried to open in that way... I missing something? :D

*and I've FF*

07-30-2006, 06:45 AM
I've logged in using the login info you supplied.

07-30-2006, 06:46 AM
LOL! Oh, okay. :D