Forum Moderators: open

Message Too Old, No Replies

JavaScript MIME Settings

Need some help - don't know JS ;)

         

wfernley

2:26 pm on Oct 27, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hey everyone,

great to see the site back up :P

I'm having a problem with JavaScript MIME settings. At least thats what I think it is...

This is my script:

<script language="JavaScript">
<!--
document.write("<img width=352 height=240 src=\"http://username:password@ipaddress:port/cgi-bin/video.jpg?cam=1&quality=3&size=2\">");
//-->
</script>

Basically what it does is display a video from a network camera. It seems like the video.jpg file is actually a CGI script that displays JPEG images at about 30 frames per second.

In Firefox it works great and displays the images at 30fps causing it to look like a video. In Internet Explorer it doesn't however. It just displays an image box with the red X. If I try to pull up the actual JPEG file it just displays a bunch of computer jiberish.

I have talked to a friend and he says he thinks it could be a MIME setting problem. Firefox detects MIME settings automatically whereas IE doesn't. I was curious if this is the problem, and if so, how do I tell IE what MIME setting to use? Also, if its not the problem........anyone know what it is? ;)

Thanks in advance for your help! :)

JAB Creations

7:03 pm on Oct 27, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Mimetypes! Gotta love em!

<script type="text/javascript">
<!--
...your script here...
//-->
</script>

The type attribute is used to declare the mimetype of elements. There is no need for language attributes since the mimetype already covers what language it is!

Hope this helps!

John