The document discusses the Document Object Model (DOM) and how it allows JavaScript to dynamically access and modify elements on a web page without reloading. It covers using the DOM to change images and create animations. Image caching is described as a technique to store images in memory rather than redownloading them, improving animation performance. The chapter aims to teach working with the Image object, DOM, and creating animations and dynamic web pages using these technologies.
Event-driven Programming for Situated MAS with ReSpecT Tuple CentresStefano Mariani
We advocate the role of tuple-based coordination languages as effective tools for event-driven programming of situated multi-agent systems (MAS). By focussing on logic-based coordination artefacts, we discuss the benefits of exploiting ReSpecT tuple centres as event-driven abstractions for MAS coordination.
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
By David F. Larcker, Stephen A. Miles, and Brian Tayan
Stanford Closer Look Series
Overview:
Shareholders pay considerable attention to the choice of executive selected as the new CEO whenever a change in leadership takes place. However, without an inside look at the leading candidates to assume the CEO role, it is difficult for shareholders to tell whether the board has made the correct choice. In this Closer Look, we examine CEO succession events among the largest 100 companies over a ten-year period to determine what happens to the executives who were not selected (i.e., the “succession losers”) and how they perform relative to those who were selected (the “succession winners”).
We ask:
• Are the executives selected for the CEO role really better than those passed over?
• What are the implications for understanding the labor market for executive talent?
• Are differences in performance due to operating conditions or quality of available talent?
• Are boards better at identifying CEO talent than other research generally suggests?
Event-driven Programming for Situated MAS with ReSpecT Tuple CentresStefano Mariani
We advocate the role of tuple-based coordination languages as effective tools for event-driven programming of situated multi-agent systems (MAS). By focussing on logic-based coordination artefacts, we discuss the benefits of exploiting ReSpecT tuple centres as event-driven abstractions for MAS coordination.
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
By David F. Larcker, Stephen A. Miles, and Brian Tayan
Stanford Closer Look Series
Overview:
Shareholders pay considerable attention to the choice of executive selected as the new CEO whenever a change in leadership takes place. However, without an inside look at the leading candidates to assume the CEO role, it is difficult for shareholders to tell whether the board has made the correct choice. In this Closer Look, we examine CEO succession events among the largest 100 companies over a ten-year period to determine what happens to the executives who were not selected (i.e., the “succession losers”) and how they perform relative to those who were selected (the “succession winners”).
We ask:
• Are the executives selected for the CEO role really better than those passed over?
• What are the implications for understanding the labor market for executive talent?
• Are differences in performance due to operating conditions or quality of available talent?
• Are boards better at identifying CEO talent than other research generally suggests?
Nobody likes to wait for web pages to load in the browser. The longer it takes, the more dissatisfied the users become. Slow web pages lead to a higher bounce rate and the loss of customers. To solve this kind of problems can be very hard sometimes. Before you even start to optimise your page, you have to understand the workflows a browser performs in order to display a page on the screen. In this talk you will get some insights in the critical rendering path and the javascript engine of your browser that help you to find performance problems and solve them. I will show you also some tools and best practices that make your life easier when it comes to performance.
Organizations focus process optimization of
Data Tier
Application Tier
Presentation Tier is usually ignored.
Presentation Tier is responsible for more than 30% of Client/Server application performance.
Improving Game Performance in the Browser
with Mickey MacDonald
Presented on September 17 2014 at
FITC's Web Unleashed 2014 event in Toronto
Poor performance is the easiest way to wreck the experience of any game; with web-based games, performance is even more crucial. In this talk, Mickey will discuss the various ways that we can optimize web-based games. He will look at the how the use of WebWorkers can increase performance, as well as tricks to improve load times and audio performance. So join Mickey and learn how to optimize your game to be lightning fast in every browser.
OBJECTIVE
Demonstrate techniques for increasing game performance in browsers
TARGET AUDIENCE
Web-based game developers
ASSUMED AUDIENCE KNOWLEDGE
Basic web-based game development skills
FIVE THINGS AUDIENCE MEMBERS WILL LEARN
Using WebWorkers to increase performance
How to speed up load times
Audio performance techniques
Best practices for graphics compression
Pooling techniques
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!SOFTTECHHUB
As the digital landscape continually evolves, operating systems play a critical role in shaping user experiences and productivity. The launch of Nitrux Linux 3.5.0 marks a significant milestone, offering a robust alternative to traditional systems such as Windows 11. This article delves into the essence of Nitrux Linux 3.5.0, exploring its unique features, advantages, and how it stands as a compelling choice for both casual users and tech enthusiasts.
Nobody likes to wait for web pages to load in the browser. The longer it takes, the more dissatisfied the users become. Slow web pages lead to a higher bounce rate and the loss of customers. To solve this kind of problems can be very hard sometimes. Before you even start to optimise your page, you have to understand the workflows a browser performs in order to display a page on the screen. In this talk you will get some insights in the critical rendering path and the javascript engine of your browser that help you to find performance problems and solve them. I will show you also some tools and best practices that make your life easier when it comes to performance.
Organizations focus process optimization of
Data Tier
Application Tier
Presentation Tier is usually ignored.
Presentation Tier is responsible for more than 30% of Client/Server application performance.
Improving Game Performance in the Browser
with Mickey MacDonald
Presented on September 17 2014 at
FITC's Web Unleashed 2014 event in Toronto
Poor performance is the easiest way to wreck the experience of any game; with web-based games, performance is even more crucial. In this talk, Mickey will discuss the various ways that we can optimize web-based games. He will look at the how the use of WebWorkers can increase performance, as well as tricks to improve load times and audio performance. So join Mickey and learn how to optimize your game to be lightning fast in every browser.
OBJECTIVE
Demonstrate techniques for increasing game performance in browsers
TARGET AUDIENCE
Web-based game developers
ASSUMED AUDIENCE KNOWLEDGE
Basic web-based game development skills
FIVE THINGS AUDIENCE MEMBERS WILL LEARN
Using WebWorkers to increase performance
How to speed up load times
Audio performance techniques
Best practices for graphics compression
Pooling techniques
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!SOFTTECHHUB
As the digital landscape continually evolves, operating systems play a critical role in shaping user experiences and productivity. The launch of Nitrux Linux 3.5.0 marks a significant milestone, offering a robust alternative to traditional systems such as Windows 11. This article delves into the essence of Nitrux Linux 3.5.0, exploring its unique features, advantages, and how it stands as a compelling choice for both casual users and tech enthusiasts.
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofsAlex Pruden
This paper presents Reef, a system for generating publicly verifiable succinct non-interactive zero-knowledge proofs that a committed document matches or does not match a regular expression. We describe applications such as proving the strength of passwords, the provenance of email despite redactions, the validity of oblivious DNS queries, and the existence of mutations in DNA. Reef supports the Perl Compatible Regular Expression syntax, including wildcards, alternation, ranges, capture groups, Kleene star, negations, and lookarounds. Reef introduces a new type of automata, Skipping Alternating Finite Automata (SAFA), that skips irrelevant parts of a document when producing proofs without undermining soundness, and instantiates SAFA with a lookup argument. Our experimental evaluation confirms that Reef can generate proofs for documents with 32M characters; the proofs are small and cheap to verify (under a second).
Paper: https://eprint.iacr.org/2023/1886
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIVladimir Iglovikov, Ph.D.
Presented by Vladimir Iglovikov:
- https://www.linkedin.com/in/iglovikov/
- https://x.com/viglovikov
- https://www.instagram.com/ternaus/
This presentation delves into the journey of Albumentations.ai, a highly successful open-source library for data augmentation.
Created out of a necessity for superior performance in Kaggle competitions, Albumentations has grown to become a widely used tool among data scientists and machine learning practitioners.
This case study covers various aspects, including:
People: The contributors and community that have supported Albumentations.
Metrics: The success indicators such as downloads, daily active users, GitHub stars, and financial contributions.
Challenges: The hurdles in monetizing open-source projects and measuring user engagement.
Development Practices: Best practices for creating, maintaining, and scaling open-source libraries, including code hygiene, CI/CD, and fast iteration.
Community Building: Strategies for making adoption easy, iterating quickly, and fostering a vibrant, engaged community.
Marketing: Both online and offline marketing tactics, focusing on real, impactful interactions and collaborations.
Mental Health: Maintaining balance and not feeling pressured by user demands.
Key insights include the importance of automation, making the adoption process seamless, and leveraging offline interactions for marketing. The presentation also emphasizes the need for continuous small improvements and building a friendly, inclusive community that contributes to the project's growth.
Vladimir Iglovikov brings his extensive experience as a Kaggle Grandmaster, ex-Staff ML Engineer at Lyft, sharing valuable lessons and practical advice for anyone looking to enhance the adoption of their open-source projects.
Explore more about Albumentations and join the community at:
GitHub: https://github.com/albumentations-team/albumentations
Website: https://albumentations.ai/
LinkedIn: https://www.linkedin.com/company/100504475
Twitter: https://x.com/albumentations
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
UiPath Test Automation using UiPath Test Suite series, part 6DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 6. In this session, we will cover Test Automation with generative AI and Open AI.
UiPath Test Automation with generative AI and Open AI webinar offers an in-depth exploration of leveraging cutting-edge technologies for test automation within the UiPath platform. Attendees will delve into the integration of generative AI, a test automation solution, with Open AI advanced natural language processing capabilities.
Throughout the session, participants will discover how this synergy empowers testers to automate repetitive tasks, enhance testing accuracy, and expedite the software testing life cycle. Topics covered include the seamless integration process, practical use cases, and the benefits of harnessing AI-driven automation for UiPath testing initiatives. By attending this webinar, testers, and automation professionals can gain valuable insights into harnessing the power of AI to optimize their test automation workflows within the UiPath ecosystem, ultimately driving efficiency and quality in software development processes.
What will you get from this session?
1. Insights into integrating generative AI.
2. Understanding how this integration enhances test automation within the UiPath platform
3. Practical demonstrations
4. Exploration of real-world use cases illustrating the benefits of AI-driven test automation for UiPath
Topics covered:
What is generative AI
Test Automation with generative AI and Open AI.
UiPath integration with generative AI
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Dr. Sean Tan, Head of Data Science, Changi Airport Group
Discover how Changi Airport Group (CAG) leverages graph technologies and generative AI to revolutionize their search capabilities. This session delves into the unique search needs of CAG’s diverse passengers and customers, showcasing how graph data structures enhance the accuracy and relevance of AI-generated search results, mitigating the risk of “hallucinations” and improving the overall customer journey.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Sudheer Mechineni, Head of Application Frameworks, Standard Chartered Bank
Discover how Standard Chartered Bank harnessed the power of Neo4j to transform complex data access challenges into a dynamic, scalable graph database solution. This keynote will cover their journey from initial adoption to deploying a fully automated, enterprise-grade causal cluster, highlighting key strategies for modelling organisational changes and ensuring robust disaster recovery. Learn how these innovations have not only enhanced Standard Chartered Bank’s data infrastructure but also positioned them as pioneers in the banking sector’s adoption of graph technology.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
2. Objectives
• Learn about dynamic Web pages
• Study the Document Object Model (DOM)
• Work with the Image object
• Create animation with the Image object
• Learn how to cache images
JavaScript, Third Edition
2
3. Introduction
• Businesses want:
– Web sites to include Formatting and images that can
be updated without the user having to reload a Web
page from the server
– Innovative ways to use animation and interactive Web
pages to attract and retain visitors
– To make their Web sites effective and easy to navigate
JavaScript, Third Edition
3
4. Introduction (Cont.)
• These kinds of effects:
– Cannot be created with standard Extensible Hypertext
Markup Language (XHTML)
– Needs the use of Dynamic HTML (DHTML)
• One of the most important aspects of DHTML is the
Document Object Model (DOM)
JavaScript, Third Edition
4
5. Creating Dynamic Web Pages
•
Dynamic:
–
Web pages that respond to user requests through
buttons or other kinds of controls
–
Various kinds of effects, such as animation, that
appear automatically in a Web browser
JavaScript, Third Edition
5
6. Creating Dynamic Web Pages
(Cont.)
• A dynamic Web page can allow a user to:
– Change the document background color
– Submit a form and process a query
– Participate in an online game or quiz
JavaScript, Third Edition
6
7. Creating Dynamic Web Pages
(Cont.)
• To make Web pages truly dynamic, you need more
than just XHTML
– Need Dynamic HTML or (DHTML)
JavaScript, Third Edition
7
8. Creating Dynamic Web Pages
(Cont.)
• Dynamic HTML (DHTML):
– Refers to a combination of technologies that make
Web pages dynamic
• The term DHTML is:
– Combination of JavaScript, XHTML, CSS, and the
Document Object Model
JavaScript, Third Edition
8
10. See this game at:
plaza.harmonix.ne.jp/~jimmeans
JavaScript, Third Edition
10
11. The Document Object Model
• Is at the core of DHTML
• Represents the Web page displayed in a window
• Each element on a Web page is represented in the
DOM by its own object
• This makes it possible for a JavaScript program to:
– Access individual elements on a Web page
– Change elements individually, without having to
reload the page from the server
JavaScript, Third Edition
11
16. Document Object Methods
• Can be used for dynamically generating and
manipulating Web pages
• Cannot be used to change content in a Web
page after it has been rendered
JavaScript, Third Edition
16
17. Document Object Model
• Document Object Methods
– close() Closes a new document that was created
with the open() method
– open() Opens a new document in a window or
frame
– write() Adds new text to a document
– writeln() Adds new text to a document, followed
by a line break.
JavaScript, Third Edition
17
19. Document Object Methods (Cont.)
• Open() method:
– Could be used to create a new document in a window or frame
– Use the write() and writeln() methods to add content to the new
document
– can include an argument specifying the MIME type of the
document to be displayed.
• default (no argument) is text/html.
JavaScript, Third Edition
19
20. Document Object Methods (Cont.)
• The close() method:
– Notifies the Web browser that
• You are finished writing to the window or frame
• The document should be displayed
JavaScript, Third Edition
20
21. Document Object Methods (Cont.)
• write(), writeln()
– if use these without first using the open() method,
they overwrite the contents of the current
document.
– if used after an open() they write into the new
browser window.
JavaScript, Third Edition
21
24. The Image Object
• Represents an image created using the <img> element
• Use to dynamically change an image displayed on a
Web page
• Image objects for each <img> element:
– Assigned to elements of images[] array in the order
they appear on the Web page
JavaScript, Third Edition
24
25. The Image Object (Cont.)
• An Image object contains various properties
and events that you can use to manipulate your
objects
JavaScript, Third Edition
25
28. The Image Object (Cont.)
• The src property:
– One of the most important parts of image object
– Allows JavaScript to dynamically change an image
– Changing assigned value also changes the src attribute
associated with an <img> element
• Dynamically changes an image displayed on a Web
page
• See
– ChangeImage.html
– Programmers.html
JavaScript, Third Edition
28
29. Animation with the Image Object
• simple animation on a Web page:
– Created by a sequence of images changed automatically
• To create an animated sequence:
– use setInterval() or setTimeout() methods to cycle
through the frames in an animation series
– Each iteration of a setInterval() or setTimeout() method
changes the frame displayed by an <img> element
– Change the frame by changing the src attribute of an
image
– Examples:
• Advertisement.html
JavaScript, Third Edition
29
30. Dynamic HTML
• Animation with the Image Object
– True animation
• Requires a different graphic, or frame, for each
movement that a character or object makes
• Frames can be automatically cycled using JavaScript
– Ensure each frame is consistent in size and position
• See runner0.html (code on next slide)
JavaScript, Third Edition
30
36. Animation
• Animation Problem: JavaScript does not
keep copies of each image in memory.
• each time a different image is loaded, JS must
physically open or reopen the image from
source.
• Solution: image caching. Save image files in
memory on local computer.
JavaScript, Third Edition
36
37. Image Caching
• Technique for eliminating multiple downloads of the
same file
• Temporarily stores image files in memory on a local
computer
• Allows JavaScript to store and retrieve an image from
memory rather than download the image each time it is
needed
JavaScript, Third Edition
37
38. Image Caching (Cont.)
•
Images are cached using the Image() constructor of
the Image object
–
•
Creates new Image object
Three steps for caching an image in JavaScript:
1. Create a new object using the Image() constructor
2. Assign a graphic file to the src property of the new
Image object
3. Assign the src property of the new Image object to
the src property of an <img> element
JavaScript, Third Edition
38
39. Dynamic HTML
• Image Caching Example.
1. image object created
<head>
<script language=“JavaScript”>
<!-- hide from incompatible browsers
function putImage(){
newImage = new Image();
newImage.src = “graphic.jpg”;
document.myImage.src = newImage.src;
}
// stop hiding -->
</script>
</head>
3.
<body onLoad = “putImage();”>
<img name = „myImage‟ src=“”>
</body>
2. image object given a source.
The image is now cached in
memory.
Document image is assigned
the cached image.
4. If use the line
document.myImage.src = “graphic.jpg”
then graphic loads every time the
line is executed. No caching
JavaScript, Third Edition
39
42. Animation
• See the following web pages:
– RunnerCache0.html
– RockingHorseCache.html
– FatCatDancing.html
JavaScript, Third Edition
42
43. Animation
• Image Caching Problem
– Erratic animation can occur due to all images not
being stored in Image objects before animation
begins
– a page may finish loading before all the images
have finished downloading.
JavaScript, Third Edition
43
44. Animation
• Image Caching
– To ensure all images are cached prior to
commencing animation:
• Use onLoad event handler of the Image object
JavaScript, Third Edition
44
45. <HTML>
RunnerCache1.html
<HEAD>
<TITLE>Runner</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!-- HIDE FROM INCOMPATIBLE BROWSERS
var runner = new Array(6);
Create an array.
var curRunner = 0;
Each element will
var startRunning;
be an Image object.
var imagesLoaded = 0;
For each element in the array:
for(var i = 0; i < 6; ++i) {
runner[i] = new Image();
1. Create an Image object
runner[i].src = "runner" + i + ".jpg";
runner[i].onload = runMarathon;
2. Assign the appropriate
}
graphics file for the source
3. Have the Image object call
the function runMarathon when
that object has finished loading.
JavaScript, Third Edition
45
46. function runMarathon() {
++imagesLoaded;
if (imagesLoaded == 6)
startRunning=setInterval("marathon()",100);
}
function marathon() {
if (curRunner == 5)
curRunner = 0;
else
++curRunner;
document.animation.src = runner[curRunner].src;
}
JavaScript, Third Edition
When all images have
loaded, start the interval
timer.
This line will NOT have
to get the image from
the server because the
runner array contains
image Objects, not just
strings.
46
47. // STOP HIDING FROM INCOMPATIBLE BROWSERS -->
</SCRIPT>
</HEAD>
<BODY>
<P><IMG SRC="runner1.jpg" NAME="animation"></P>
name of the image.
</BODY>
Body does nothing.
</HTML>
See RockingHorseImageLoad.html also!
JavaScript, Third Edition
47
49. Chapter Summary
• Dynamic HTML (DHTML):
– Combination of technologies that make Web pages
dynamic
– DHTML is a combination of JavaScript, XHTML,
CSS, and the Document Object Model
• Document Object Model, or DOM:
– At the core of DHTML
– Represents the Web page displayed in a window
JavaScript, Third Edition
49
50. Chapter Summary (cont.)
• The open() method:
– Creates a new document in a window or frame
• The close() method:
– Notifies Web browser that you are finished writing to
the window or frame and that the document should be
displayed
• An Image object:
– Represents an image created using the <img> element
JavaScript, Third Edition
50
51. Chapter Summary (cont.)
• Src property:
– One of the most important properties of the Image
object
– Allows JavaScript to change an image dynamically
JavaScript, Third Edition
51
52. Chapter Summary (cont.)
• Image caching:
– Technique for eliminating multiple downloads of the
same file
– Temporarily stores image files in memory
– Allows JavaScript to store and retrieve an image from
memory rather than downloading the image each time
it is needed
JavaScript, Third Edition
52
53. Chapter Summary (cont.)
• Onload event handler of the Image:
– Use it to be certain that all images are downloaded into
a cache before commencing an animation sequence
JavaScript, Third Edition
53