crossProbe probeExecute.


cp.probeExecute
cp.probeExecute( [type->]plug-in, [optional; mime-type])
default property for probe: name
return value; BOOLEAN value of the proberesult
  This is the actual detection function, the crossProbe core. It is designed to somewhat inherit the look and feel of Netscapes navigator.plugins array. Plug-in names and descriptions supplied inhere are recognized exactly as the appear in Netscape's navigator-object. Exceptions in some cases, where the plug-in minor version-numbers are left out for compability reasons. When you are setting up a detection system using the crossProbe, you should test that things are working properly with atleast Netscape and MS Internet Explorer. When running in MSIE aside from Netscape, crossProbe requires a correct argument-syntax passed in by the probeExecute-method. If the argument doesn't match a corresponding library entry, crossProbe will tell you so and interrupt further execution.
  The probeExecute - method feautures some nifty options;
AXIDs Indexed ShortCut-probe.
Plug-in names are case -insensitive.
Righthand WildCard (*) support.
Supply mime-Type for extensive check. (NS only.)
Choose plug-in property, either "name->plug-in" or "description->plug-in". iterates over the navigator.plugins array by chosen property [name] or [description].


Here below are some examples of the variety of ways to probe.

Note!: On MSIE 4 (MacPPC, 68k, Win CE/3.1 and UNIX), the probeExecute - method is overridden. Read about the disableDefaultsIE - property to manage these situations and how to get the crossProbe events to trig anyway.

cp.probeExecute( "name->Shockwave Flash 2.0" )
/* detects Flash 2 * the "name" property-search is default, therefore not needed. */

cp.probeExecute ( "SHOCKWAVE FLASH 2.0" )
/* detects Flash 2 * same as above, case insensitivity*/

cp.probeExecute(5)
/* detects Flash 2 - Indexed Shortcut-probe,
see AXID Lib Index. */


cp.probeExecute ( "desc->Shockwave Flash 4*" )
/* detects Flash 4 presence, wildcarded(*) */

cp.probeExecute (3)
/* detects Flash 4+ * short-cut probe (same as previous) */

cp.probeExecute ( "description->Shockwave Flash 3*" , "application/x-shockwave-flash" )
/* detects Shockwave Flash version 3,with mimeType safecheck */

Any of these can be combined in a multple condition like;

var swf_3or4 = (cp.probeExecute (4)||cp.probeExecute(3) )
/*the variable swf_3or4 will now hold a boolean value telling whether the client has Shockwave Flash 3 OR 4 installed */


The proberesult can also be retrieved later thru cp.probeSuccess, this property will contain a boolean value stating whether the last probe was
successful or not.
(see the Sample Area for more examples.)

!!! Be careful with the use of wildcards,
it may cause crossProbe to detect
more than you intended to
!!!

Reference Index.