Flash Games

 FAQ   Search   Members   Groups   Register  User Control Panel      Login 

Your time now:
Mon Nov 23, 2009 10:52 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ]  Bookmark and Share
Author Message
 Post subject: Validation Errors
PostPosted: Wed Oct 10, 2007 8:49 pm 
Offline

Joined: Wed Oct 10, 2007 8:37 pm
Posts: 3
Hi all, and thanks up front if anyone can help.
I am doing some SEO work for a client, and as part of that, I am validating some pages.
On their front page, they have javascript to detect OS's & flash version for a flash.
In this code, I am coming up with validation errors, and would like to know if it is ok to cut/delete the extra ampersand before the isWin and IsOpera below...

(i know very little about javascript)

(it appears in many places and the extra ampersand is triggering the code error)

Code:
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
   reqVer = parseFloat(reqMajorVer + "." + reqRevision);
      // loop backwards through the versions until we find the newest version   
   for (i=25;i>0;i--) {
      if (isIE && isWin && !isOpera) {
         versionStr = VBGetSwfVer(i);
      } else {
         versionStr = JSGetSwfVer(i);      
      }
      if (versionStr == -1 ) {
         return false;
      } else if (versionStr != 0) {
         if(isIE && isWin && !isOpera) {
            tempArray         = versionStr.split(" ");
            tempString        = tempArray[1];
            versionArray      = tempString .split(",");            
         } else {
            versionArray      = versionStr.split(".");
         }
         versionMajor      = versionArray[0];
         versionMinor      = versionArray[1];
         versionRevision   = versionArray[2];
         
         versionString     = versionMajor + "." + versionRevision;   // 7.0r24 == 7.24
         versionNum        = parseFloat(versionString);
           // is the major.revision >= requested major.revision AND the minor version >= requested minor
         if ( (versionMajor > reqMajorVer) && (versionNum >= reqVer) ) {
            return true;
         } else {
            return ((versionNum >= reqVer && versionMinor >= reqMinorVer) ? true : false );   
         }
      }
   }   
   return (reqVer ? false : 0.0);
}


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group - Flash Games - TNX Invitation Code - TNX Review


Webmaster - Excruciating - Johnathan - Kotik - Ash - Tomi - rangana - Phate - dflynn - Medley