spacer
Yehuda Shiran October 11, 2000
Deriving HTML+TIME's Active Time
Tips: October 2000

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
Mandrake Linux Founder Back, Virtually
Amazon: We're a Technology Company
Sun Expands MySQL With Closed Source
The HTML+TIME capability in IE 5.5 and up is based on the timeline principle. Some applications require that you know exactly the time you are at. You do it by using the currTimeState object, which is a property of any container that participates in the HTML+TIME behavior. One of currTimeState's many properties and methods is the activeTime property. The activeTime property reports the exact time the script is on. The following example (based on a Microsoft script) demonstrates the usage of activeTime. When you click the button, we print the active time. Since it is instantanous, you will see a larger number every time you click the button. Here is the function that prints the active time of the timeline:

function printTime() {
  var now = parallel.currTimeState.activeTime;
  alert(now.toFixed(2));
}

And here is the Demo:

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6
Here is the HTML code:

<INPUT TYPE="button" value="Show Active Time" onclick="printTime()">
<t:PAR CLASS="time" ID="parallel" REPEATCOUNT="indefinite">
    <H1 ID="hdg1" CLASS="time" STYLE="color:red;" 
	TIMEACTION="style" BEGIN="0" DUR="3">Heading 1</H1>
    <H2 ID="hdg2" CLASS="time" STYLE="color:red;" 
	TIMEACTION="style" BEGIN="0" DUR="3">Heading 2</H2>
    <H3 ID="hdg3" CLASS="time" STYLE="color:blue;" 
	TIMEACTION="style" BEGIN="3" DUR="3">Heading 3</H3>
    <H4 ID="hdg4" CLASS="time" STYLE="color:blue;" 
	TIMEACTION="style" BEGIN="3" DUR="3">Heading 4</H4>
    <H5 ID="hdg5" CLASS="time" STYLE="color:green;" 
	TIMEACTION="style" BEGIN="6" DUR="3">Heading 5</H5>
    <H6 ID="hdg6" CLASS="time" STYLE="color:green;" 
	TIMEACTION="style" BEGIN="6" DUR="3">Heading 6</H6>
</t:PAR>

Learn more about HTML+TIME in Column 67, Introduction to HTML+TIME.


People who read this tip also read these tips:

Look for similar tips by subject:

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Whitepapers and eBooks

Intel Whitepaper: Comparing Two- and Four-Socket Platforms for Server Virtualization
IBM Solutions Brief: Go Green With IBM System xTM And Intel
HP eBook: Simplifying SQL Server Management
IBM Contest: Are You the Next Superstar? Join the "Search for the XML Superstar" Contest to Find Out
Microsoft PDF: Top 10 Reasons to Move to Server Virtualization with Hyper-V
Microsoft PDF: Six Reasons Why Microsoft's Hyper-V Will Overtake Vmware
Microsoft Step-by-Step Guide: Hyper-V and Failover Clustering
Intel PDF: Quad-Core Impacts More Than the Data Center
Intel PDF: Virtualization Delivers Data Center Efficiency
Go Parallel Article: PDC 2008 in Review
Microsoft PDF: Top 11 Reasons to Upgrade to Windows Server 2008
Avaya Article: Communication-Enabled Mashups: Empowering Both Business Owners and IT
Intel Whitepaper: Building a Real-World Model to Assess Virtualization Platforms
  PDF: Intel Centrino Duo Processor Technology with Intel Core2 Duo Processor
Microsoft Article: Build and Run Virtual Machines with Hyper-V Server 2008
Go Parallel Article: Q&A with a TBB Junkie
IBM Whitepaper: Innovative Collaboration to Advance Your Business
Internet.com eBook: Real Life Rails
IBM eBook: The Pros and Cons of Outsourcing
Internet.com eBook: Best Practices for Developing a Web Site
IBM CXO Whitepaper: The 2008 Global CEO Study "The Enterprise of the Future"
Avaya Article: Call Control XML in Action - A CCXML Auto Attendant
IBM CXO Whitepaper: Unlocking the DNA of the Adaptable Workforce--The Global Human Capital Study 2008
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
HP eBook: Guide to Storage Networking
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
webref The latest from WebReference.com Browse >
Popular JavaScript Framework Libraries: An Overview - Part 3 · Accessing Your MySQL Database from the Web with PHP · Working with the DOM Stylesheets Collection
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Crucial Triples Up With New Three-Channel DDR3 Kits · Meet the Finalists: Excellence in Technology Awards · Tealeaf Offers Insight to Mobile Customer Behavior