General discussion

Locked

Javascript - Browser Detect - Wav Files

By megashub ·
A user replied to my question about detecting the browser and using one piece of code for one, and one piece of code for the other with this - which is fine:

function Detect()
{
if(navigator.appName== "Microsoft Internet Explorer")
{
Put your media player code for internet
explorer between these braces
}
else {
Put your media player code for
Netscape Navigator between these braces
}
}

However I also have the problem where IE's player and Quicktime both play the WAV's automatically once their downloads have completed. Is there any way to turn that off in the code?

There must be as most sites don't have that problem.

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Javascript - Browser Detect - Wav Files

by allpainful In reply to Javascript - Browser Dete ...

Below is the exact script i use. I would think that where I have autostart=true you fould put false to get IE not to autostart the playing.

<script LANGUAGE="JavaScript">
<!--
if (navigator.appName == "Netscape") {
document.write('<EMBED SRC="x-files2.mid" AUTOSTART=true LOOP=false WIDTH=5 HEIGHT=5 ALIGN="CENTER"></EMBED>') }

else { if (navigator.appName == "Microsoft Internet Explorer")

document.write('<BGSOUND SRC="x-files2.mid" LOOP="0">')
}
//--></script>

Collapse -

Javascript - Browser Detect - Wav Files

by megashub In reply to Javascript - Browser Dete ...

Poster rated this answer

Collapse -

Javascript - Browser Detect - Wav Files

by megashub In reply to Javascript - Browser Dete ...

This question was closed by the author

Back to Web Development Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums