Microsoft KB Archive/298397

= BUG: HTML+TIME Code Fails Inside an Element Behavior =

Article ID: 298397

Article Last Modified on 5/11/2006

-

APPLIES TO


 * Microsoft Internet Explorer 5.0
 * Microsoft Internet Explorer 5.01
 * Microsoft Internet Explorer (Programming) 5.01 SP1
 * Microsoft Internet Explorer 5.5

-



This article was previously published under Q298397



SYMPTOMS
When you use HTML+TIME code inside an element behavior, HTML+TIME does not work correctly. The HTML+TIME effect is not initialized.



CAUSE
Current HTML+TIME implementation depends heavily on the HTMLWindow events and starts with the onLoad event. Because element behavior does not have an HTMLWindow event, HTML+TIME does not start.



RESOLUTION
To work around this problem, place your HTML+TIME code outside an element behavior.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



Steps to Reproduce Behavior
  Create a new HTML page named Work.htm, and paste the following code:   <?IMPORT namespace=&quot;t&quot; implementation=&quot;#default#time2&quot;>  .time   { behavior: url(#default#time2); }  

  Animated DIV that with move from left to right over time.



</DIV>

</BODY> </HTML> </li> <li>In Internet Explorer, browse to Work.htm. Notice that the red color DIV element moves from left to right over time.</li> <li> Create a new HTML Component file named Mytime.htc, and paste the following code that is based on the preceding code: <public:component tagName=&quot;animSquare&quot;>

<public:defaults viewLinkContent/>

<HTML XMLNS:t =&quot;urn:schemas-microsoft-com:time&quot;>  <?IMPORT namespace=&quot;t&quot; implementation=&quot;#default#time2&quot;>  .time   { behavior: url(#default#time2); } </STYLE> </HEAD>

<BODY ID=&quot;oBody&quot;> <DIV ID=&quot;oDiv&quot; style=&quot;position:absolute; top:50; left:20; background-color:yellowgreen;&quot;> Animated DIV that with move from left to right over time.

<t:animateMotion begin=&quot;1&quot; dur=&quot;3&quot; calcMode=&quot;spline&quot; keySplines=&quot;0 .75 .5 1&quot; keyTimes=&quot;0;1&quot; values=&quot;20,0;300,0&quot; fill=&quot;hold&quot;/>

</DIV>

</BODY> </HTML> </public:component>

</li> <li> Create a new HTML page named Fail.htm, and paste the following code: <HTML XMLNS:MYTIME>  <?IMPORT namespace=&quot;MYTIME&quot; implementation=&quot;Mytime.htc&quot; /> </HEAD> <BODY>

<MYTIME:animSquare value =&quot;T2&quot;/>

</BODY> </HTML> </li> <li>In Internet Explorer, browse to Fail.htm. Notice that the DIV element does not move.</li></ol>

<div class="references_section">