FP98: JavaScript Error if Animation Applied Only to Image

ID: Q175171


The information in this article applies to:


SYMPTOMS

When you click the Preview tab at the bottom of the FrontPage Editor window, or when you click Preview In Browser on the File menu, you receive a JavaScript error message.

NOTE: The exact text of the error message varies depending on which Web browser you are using to view the page.


CAUSE

This behavior occurs when you apply the following types of animation to a selected image, but your selection does not contain any text:

Animation effects are designed to animate text, not images. When you apply animation to an image or text, FrontPage writes JavaScript code that uses the paragraph tag (<P>) to determine where to start and stop the animation. The error message appears if no text is found.


MORE INFORMATION

For more information about writing HTML, please see the following Microsoft Web site:

http://www.microsoft.com/workshop/author/newhtml/default.htm
For more information about JavaScript, please see the following Microsoft Web site:
http://www.microsoft.com/scripting/jscript


WORKAROUND

To work around this behavior and avoid the error message, use either of the following methods.

NOTE: These methods will not animate the image.

Method 1: Insert a Space before Applying Animation

  1. Click in front of the image.


  2. Press the SPACEBAR one time.


  3. Select the space and the image.


  4. On the Format menu, point to Animation, and then click the effect you want to use.


Method 2: Place the Image inside a Paragraph Element

  1. Click the HTML tab at the bottom of the FrontPage Editor window.


  2. Add the following tag before the <img src="imagename.jpg"> tag, where "imagename" is the file name of the image you are using:
    <p>


  3. Add the following tag after the <img src="imagename.jpg"> tag, where "imagename" is the file name of the image you are using:
    </p>


  4. Click the Normal tab.


Microsoft Technical Support will not resolve problems produced by editing the HTML that FrontPage generates. This HTML Code sample is provided as a convenience for authors seeking to extend the capabilities of FrontPage.

Additional query words: dhtml fpedit jscript


Keywords          : kbdta fpedit fphtml 
Version           : WINDOWS:
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: July 28, 1999