Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Quicktime and JS - what am I missing?

Reply
Thread Tools

Quicktime and JS - what am I missing?

 
 
Binba
Guest
Posts: n/a
 
      06-20-2007
I created the simplest embed QT movie page, and for starters, want to
get the version. An HREF event works fine, but otherwise I get a
fabulous "Unspecified error".
I'm using MSIE6 WinXP SP2.

<html>
<body>
<OBJECT
classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
codebase="http://www.apple.com/qtactivex/qtplugin.cab"
width="320" height="256" id="movie1">
<PARAM name="src" value="test.mov">
<EMBED HEIGHT=256 WIDTH=320
SRC="test.mov" TYPE="video/quicktime"
PLUGINSPAGE="www.apple.com/quicktime/download"
EnableJavaScript="true" NAME="movie1">
</OBJECT>

//works:
<a href="javascript:alert
(document.movie1.GetQuickTimeVersion());">version</a>

//doesn't:
<script language="JavaScript">
<!--
alert (document.movie1.GetQuickTimeVersion());
// -->
</script>

</body>
</html>

Am I missing something really basic here?

Thanks.

 
Reply With Quote
 
 
 
 
RobG
Guest
Posts: n/a
 
      06-20-2007
On Jun 20, 12:28 pm, Binba <(E-Mail Removed)> wrote:
> I created the simplest embed QT movie page, and for starters, want to
> get the version. An HREF event works fine, but otherwise I get a
> fabulous "Unspecified error".
> I'm using MSIE6 WinXP SP2.
>
> <html>
> <body>
> <OBJECT
> classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
> codebase="http://www.apple.com/qtactivex/qtplugin.cab"
> width="320" height="256" id="movie1">
> <PARAM name="src" value="test.mov">
> <EMBED HEIGHT=256 WIDTH=320
> SRC="test.mov" TYPE="video/quicktime"
> PLUGINSPAGE="www.apple.com/quicktime/download"
> EnableJavaScript="true" NAME="movie1">
> </OBJECT>
>
> //works:
> <a href="javascript:alert
> (document.movie1.GetQuickTimeVersion());">version</a>


Assuming that movie1 is an object and that GetQuickTimeVersion is
necessarily a mehthod supported by that object seems a little error
prone. Try:

var movie = document.movie1;
if (movie && tyepof movie.GetQuickTimeVersion == 'function') {
alert( movie.GetQuickTimeVersion() )
} else {
// Either movie1 isn't an element in one of the standard
collections
// or it doesn't have a GetQuickTimeVersion method
}

That should also check whether the QuickTime plugin is installed. I
can't test it right now since I don't have (or want) QuickTime on my
Windows machine. I can test it later on a Mac if you want.

>
> //doesn't:
> <script language="JavaScript">
> <!--


The language attribute is deprecated, type is required. There is no
point to HTML comments inside script elements, just don't use them.

<script type="text/javscript">


To be strictly standards compliant you should be using
type="application/javascript" but it will cause your scripts to fail
in at least some browsers. Some suggest ignoring validation errors
and using:

<script> ... </script>


--
Rob

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Firefox 1.5 and Quicktime Manual Install RyeTronics Firefox 7 01-19-2006 03:04 AM
Quicktime and Firefox Scott Nelson Firefox 1 10-29-2005 10:51 PM
Quicktime and Apache Ant johnathan james Java 0 06-08-2005 04:37 PM
Firefox and Quicktime Spike Firefox 7 12-02-2004 01:35 AM
Mozilla, Quicktime, and file extensions Matt O'Toole Firefox 0 12-07-2003 08:47 PM



Advertisments