Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > GeckoActiveXObject == 'undefined' for NS 7.1

Reply
Thread Tools

GeckoActiveXObject == 'undefined' for NS 7.1

 
 
scott simpson
Guest
Posts: n/a
 
      12-17-2003
ns 7.1 on win2k:

i am trying to sniff out the (ax) version of the NS browsers and am
not having any luck. both of the following alert 'undefined':

alert('GeckoActiveXObject=' + typeof GeckoActiveXObject);
alert('GeckoActiveXObject=' + window.GeckoActiveXObject);

it seems very straight forward but the results are puzzling. has
anyone had this same issue? thoughts/suggestions?

cheers...
 
Reply With Quote
 
 
 
 
Janwillem Borleffs
Guest
Posts: n/a
 
      12-17-2003

"scott simpson" <(E-Mail Removed)> schreef in bericht
news:(E-Mail Removed) om...
>
> i am trying to sniff out the (ax) version of the NS browsers and am
> not having any luck. both of the following alert 'undefined':
>
> alert('GeckoActiveXObject=' + typeof GeckoActiveXObject);
> alert('GeckoActiveXObject=' + window.GeckoActiveXObject);
>


Testing with Mozilla 1.5 on WinXP I get the expected "function" on the
first. The second throws an error because Mozilla cannot cast an object to a
primitive type.

Changing it into:
alert('GeckoActiveXObject=' + (window.GeckoActiveXObject ? 1 : 0) );

fixed this.


JW



 
Reply With Quote
 
 
 
 
Janwillem Borleffs
Guest
Posts: n/a
 
      12-17-2003

"Janwillem Borleffs" <(E-Mail Removed)> schreef in bericht
news:3fe0ca63$0$188$(E-Mail Removed)...
>
> Testing with Mozilla 1.5 on WinXP I get the expected "function" on the
> first. The second throws an error because Mozilla cannot cast an object to

a
> primitive type.
>


That sounds silly when you read it back... I meant that the
window.GeckoActiveX function couldn't be converted for displaying in the
alert box.


JW



 
Reply With Quote
 
DU
Guest
Posts: n/a
 
      12-17-2003
scott simpson wrote:

> ns 7.1 on win2k:
>
> i am trying to sniff out the (ax) version of the NS browsers and am
> not having any luck. both of the following alert 'undefined':
>
> alert('GeckoActiveXObject=' + typeof GeckoActiveXObject);
> alert('GeckoActiveXObject=' + window.GeckoActiveXObject);
>
> it seems very straight forward but the results are puzzling. has
> anyone had this same issue? thoughts/suggestions?
>
> cheers...


The answer to your query was available at this precise url:

Windows Media Player in Netscape 7.1
Client-side Detection Using JavaScript Objects
http://devedge.netscape.com/viewsour...a-in-netscape/

Janwillem B. answered you correctly btw.

DU
 
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




Advertisments