Checking for browser compatibility

Checking for browser compatibility

Dreamweaver enables you to create web pages with elements that are supported by all major graphical browsers (such as images and text), as well as with elements that are supported only by newer browsers (such as CSS styles).

You should determine who the audience for your site is likely to be, and what browsers they’re likely to use. If most of your users will be using Netscape 4 (as is still true in some academic intranet environments, for example), you should avoid using tags that aren’t supported in that browser.

The Check Target Browsers feature tests the code in your documents to see if any of the tags, attributes, CSS properties, or CSS values are unsupported by your target browsers. The check does not alter the document in any way.

The target browser check gives information about three levels of potential problems: errors, warnings, and informational messages. The following descriptions explain the differences between those levels:

  • An error indicates code that may cause a serious visible problem in a particular browser, such as causing parts of a page to disappear. (In some cases, code with an unknown effect is also marked as an error.)
  • A warning indicates a piece of code that won’t be displayed correctly in a particular browser, but that won’t cause any serious display problems.
  • An informational message indicates code that isn’t supported in a particular browser, but that has no visible effect; for example, the img tag’s galleryimg attribute isn’t supported in some browsers, but those browsers ignore that attribute, so it has no visible effect.

By default, Dreamweaver automatically performs a target browser check whenever you open a document. You can also run a target browser check manually on a document, on a folder, or on an entire site.

The target browser check does not check scripts in your site. Also, the target browser check is not a syntax validator; it detects only markup that isn’t supported in your target browsers.

To select browsers for Dreamweaver to check against:

  1. Select Settings from the Target Browser Check menu in the Document toolbar. This is a picture of the feature being described.

    The Check Target Browsers dialog box appears.

  2. Select the checkbox next to each browser you want to check.
  3. For each selected browser, select a minimum version to check against from the corresponding pop-up menu.

    For example, to verify that all of the document’s markup is supported in Microsoft Internet Explorer 3.0 and later and Netscape Navigator 4.0 and later, select the checkboxes next to those browser names, and select 3.0 from the Microsoft Internet Explorer pop-up menu and 4.0 from the Netscape Navigator pop-up menu.

To view the results of an automatic target browser check, do one of the following:

  • Open a file and view the file in Code view (View > Code or View > Code and Design).
  • After making a change in Code view, click the Refresh button in the Property inspector or press F5.

A wavy red underline appears under the name of every item that’s considered an error in one of your target browsers. (Warnings and informational messages are not marked in Code view; to view warnings and informational messages, view the report for the entire document.) If Dreamweaver finds no unsupported markup, then nothing is underlined, and the Target Browser Check menu icon in the Document toolbar changes to indicate that there are no errors.

To see which browsers don’t support a specific red-underlined item:

  • Position the pointer to point to the red-underlined text.

A tooltip appears, indicating which browsers don’t support that item.

To view the Check Target Browser report for the entire document:

  • In the Target Browser Check menu in the Document toolbar, select Show All Errors.

The Results panel group appears, with the Target Browser Check panel selected. Errors are marked with a red exclamation mark icon, warnings are marked with a yellow exclamation mark icon, and informational messages are marked with a word-balloon icon.

To view a long error message in the Target Browser Check panel:

  1. Open the Target Browser Check panel.
  2. Select an error message that’s too long to read in the panel.
  3. Click the More Info button. This is a picture of the feature being described.

A Description dialog box appears, displaying the full text of the selected error message.

To disable the automatic target browser check:

  • Deselect Auto-Check On Open from the Target Browser Check menu in the Document toolbar.

To jump to the next or previous error in the code:

  • Select Next Error or Previous Error from the Target Browser Check menu in the Document toolbar.

To jump to a specific error from the Target Browser Check panel:

  • Double-click the error message.

The unsupported markup is selected in Code view.

To run a target browser check manually on the current file:

  • Select File > Check Page > Check Target Browsers.

The report appears in the Target Browser Check panel (in the Results panel group).

To run a target browser check manually on a site or a set of selected files:

  1. In the Local view of the Files panel, select a set of files, or select the folder that contains the entire site.
  2. Select File > Check Page > Check Target Browsers.

    The report appears in the Target Browser Check panel (in the Results panel group).

  3. To cancel the report while it’s running, click the Stop button in the Target Browser Check panel.

To switch between viewing the current document report and viewing the full site report:

  • In the Target Browser Check panel, select Current Document or Site Report from the pop-up menu.

To save a target browser check report:

  • Click the Save Report button in the Target Browser Check panel.

To view a target browser check report in a browser:

  • Click the Browse Report button in the Target Browser Check panel.

To fix an error:

  • Remove the unsupported code, or change it to other code that’s supported by your target browsers.

To specify that Dreamweaver should ignore a particular type of error:

  • Right-click (Windows) or Control-click (Macintosh) red-underlined code, and select Ignore Error from the context menu.

That type of error is changed to a warning, and Dreamweaver stops underlining that type of error in all documents.

Related topics

  • Validating your tags


Getting Started with Dreamweaver
Dreamweaver Basics
Working with Dreamweaver Sites
Laying Out Pages
Adding Content to Pages
Working with Page Code
Setting Up Your Coding Environment
Preparing to Build Dynamic Sites
Making Pages Dynamic
Developing Applications Rapidly
 
ASPTreeView.com
 
Evaluation has ЗДНДЗ·Ъexpired.
Info...