uShop English (U.S.) for 179!

uStorekeeper English (U.S.) for 149!

 Tech Support
       Support Policy
       Knowledge Base
       Reference Sites
       Software Piracy
       Legal Notices
       Privacy Policy
       Reseller Info
       Contact Us
       Site Map

Knowledge Base Lobby : uShop Support Conference : General Questions
Oct-21-17 11:00 PM EST
Original Message
Author Ron Harter on 07-06-2003 at 22:24 (EST)
I found something interesting on the Amazon web site and wonder if it is something I should use.
I am not a programmer but it looks like it may be checking to see which browser the customer is using. I don't know how much will show up in this forum but I will give it a try:

script language="JavaScript1.1" type="text/javascript"
var agt=navigator.userAgent.toLowerCase();
var is_major = parseInt(navigator.appVersion);
var is_nav = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
&& (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
&& (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
var is_gecko = (agt.indexOf('gecko') != -1);
var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
var is_aol = (agt.indexOf("aol") != -1);
var is_opera = (agt.indexOf("opera") != -1);
var is_win = ( (agt.indexOf("win")!=-1) &pip;&pip; (agt.indexOf("16bit")!=-1) );

I also noticed they specify javascript1.1 rather than just javascript.
Maybe you can shed some light on this.

Table Of Contents
  RE: Javascript Bill Weiner, 2003-07-08 06:42:27 (1)

Messages In This Discussion
         1. RE: Javascript
        Author Bill Weiner on 07-08-2003 at 06:42 (EST)
Yes, it looks like the JavaScript is just trying to determine the browser type. They must have other JavaScripts on their page that need to know the browser type ... probably for formatting reasons.

And as for the specification of JavaScript 1.1 instead of just JavaScript, that is just to ensure that JavaScript 1.1 is used since that is the syntax/functions used in their script. Without that specification, the browser would just use it's default... which may/may not be JavaScript 1.1.

With uShop's Java Applets and JavaScripts, there is no reason why you would need to use such a JavaScript.

© 2003 Microburst Technologies, Inc.