Checking for Plug-ins


Check Plugin sends users to different pages depending on whether they have particular plug-ins. For example, if a user has Shockwave installed, you might send them to one page, otherwise , you might send them to a page where they get the same information but without Shockwave.

Most Dreamweaver behaviors are dependable cross-browser, but Check Plugin smacks into some browser issues. You can't detect plug-ins in Internet Explorer for Windows using JavaScript. Dreamweaver adds a VBScript plug-in detector when you select Flash or Director. This only works with Internet Explorer on Windows. There's no way to use Dreamweaver behaviors to check for plug-ins on Internet Explorer on Macintosh.

To add the Check Plugin action:

1.
In the document window, use the tag selector to select either the document (the <body> tag) or a link (the <a> tag).

2.
In the Behaviors panel, click the plus sign and select the Check Plugin action. The Check Plugin dialog opens ( Figure 12.19 ) and shows the following:

  • Choose a plug-in from the pop-up menu: Flash, Shockwave, Live Audio, Quick Time, or Windows Media Player.

    or

  • Click the Enter radio button and type the name of a plug-in in the text box. The name must be exactly the same as the name in bold on the About Plug-ins page in a Netscape browser. To see the About Plug-ins page, enter about: plugins in Netscape's address field.

  • If found, go to URL: Enter the URL in this text box. This field is optional; if you leave it blank the user stays on the same page if the plug-in is detected .

  • Otherwise, go to URL: Enter the alternate URL in the text box. If you leave this field blank, users without the plug-in will stay on the same page.

  • Always go to first URL if detection is not possible: If detection is impossible , the user is sent to the URL in the "Otherwise, go to URL" box. If you select this check box, then the user instead goes to the first URL. If this is checked, users may be prompted by the browser to download the plug-in.

Figure 12.19. You can check for any plug-in, if you know the correct name for it.


3.
Click OK to accept changes.

4.
Check the default event in the Behaviors panel to be sure it's the one you want.

Tips

  • All Netscape browsers since version 2.0 can detect plug-ins. By "Netscape browser," we mean Netscape Navigator, Communicator, Mozilla, Firefox, and other browsers based on any of these.

  • Microsoft Internet Explorer for Mac does allow checking of plug-ins via JavaScript; however, Macromedia wrote their code to not allow it to work for this one browser. Why they did this, we don't know. We also don't know why Microsoft was able to put real plug-in detection into their Mac browser but not their Windows browser. If you're on a Mac, though, you should be using Safari or Firefox, in which case this would not affect you.





Macromedia Dreamweaver 8 for Windows & Macintosh Visual QuickStart Guide
Macromedia Dreamweaver 8 for Windows & Macintosh
ISBN: 0321350278
EAN: 2147483647
Year: 2005
Pages: 239

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net