The document summarizes key aspects of using JavaScript with the DOM:
1) The DOM represents the document as nodes that can be accessed and manipulated with JavaScript. Common methods are getElementById() and getElementsByTagName() to select nodes, and createElement() to generate new nodes.
2) Events allow JavaScript to react to user actions. Event handlers can be assigned to nodes using onclick attributes or addEventListener(). Events bubble up the DOM tree by default but can be stopped from propagating with stopPropagation().
3) The this keyword refers to the "owner" or context of the executing function, such as the HTML element to which an event handler is assigned. Understanding this is important for manipulating nodes from
JavaScript - Chapter 4 - Types and StatementsWebStackAcademy
A computer program is a list of "instructions" to be "executed" by a computer.
In a programming language, these programming instructions are called statements.
A JavaScript program is a list of programming statements.
JavaScript statements are composed of:
Values, Operators, Expressions, Keywords, and Comments.
This statement tells the browser to write "Hello Dolly." inside an HTML element with id="demo":
JavaScript Data Types
JavaScript variables can hold many data types: numbers, strings, objects and more.
In programming, data types is an important concept.
To be able to operate on variables, it is important to know something about the type.
JavaScript - Chapter 4 - Types and StatementsWebStackAcademy
A computer program is a list of "instructions" to be "executed" by a computer.
In a programming language, these programming instructions are called statements.
A JavaScript program is a list of programming statements.
JavaScript statements are composed of:
Values, Operators, Expressions, Keywords, and Comments.
This statement tells the browser to write "Hello Dolly." inside an HTML element with id="demo":
JavaScript Data Types
JavaScript variables can hold many data types: numbers, strings, objects and more.
In programming, data types is an important concept.
To be able to operate on variables, it is important to know something about the type.
What is JavaScript?
JavaScript is a very powerful client-side scripting language. JavaScript is used mainly for enhancing the interaction of a user with the webpage. In other words, you can make your webpage more lively and interactive, with the help of JavaScript. JavaScript is also being used widely in game development and Mobile application development.
All you need to know about CSS:
Selectors
Value Processing
Cascading
Box Model
Visual Formatting Model
Block Formatting Context
Stacking Context
At-Rules
Units
Presentation with examples:
http://rawgit.com/vzhidal/HTML-CSS-Training-Presentations/master/css-basics.html
This presentation is an introduction to the new features of
HTML5. The main elements of this document are:
* Brief history of HTML5
*The improvements
* Browser support
* Semantic elements
* Content Editable on pages
* Video Tag
* Canvas tag
* Local storage
* Geolocation API
* Offline applications
* Microdata
* Use cases
What is JavaScript?
JavaScript is a very powerful client-side scripting language. JavaScript is used mainly for enhancing the interaction of a user with the webpage. In other words, you can make your webpage more lively and interactive, with the help of JavaScript. JavaScript is also being used widely in game development and Mobile application development.
All you need to know about CSS:
Selectors
Value Processing
Cascading
Box Model
Visual Formatting Model
Block Formatting Context
Stacking Context
At-Rules
Units
Presentation with examples:
http://rawgit.com/vzhidal/HTML-CSS-Training-Presentations/master/css-basics.html
This presentation is an introduction to the new features of
HTML5. The main elements of this document are:
* Brief history of HTML5
*The improvements
* Browser support
* Semantic elements
* Content Editable on pages
* Video Tag
* Canvas tag
* Local storage
* Geolocation API
* Offline applications
* Microdata
* Use cases
JavaScript Browser Events are an essential part of web development, allowing developers to create dynamic, interactive web applications. In this presentation, we will explore the basics of JavaScript Browser Events, including what they are, how they work, and why they are important.
Will your code blend? : Toronto Code Camp 2010 : Barry GervinBarry Gervin
XAML getting you down? Tired of the repetition of trial by error WPF or Silverlight development? If you’re not using Expression Blend to build your XAML, you’re doing it all wrong. Let’s take a look at the common pitfalls that new Silverlight developers fall into that make their code unblendable, and then leverage the patterns and techniques that allow us to unlock the virtues of Expression Blend. Testability, blendability, inner peace and maintainability are just 1 hour away
Flex Building User Interface ComponentsAhmad Hamid
design user interface components in flex is just like any other language. This presentation provides some guidelines as to how such components should be design and implemented with performance in mind.
Comet: an Overview and a New Solution Called JabbifyBrian Moschel
Brian Moschel delivered this talk at the JS.Chi() April 2009 meetup. This talk provides an overview of Comet, also known as HTTP Push, covering how it works on the server and client, several implementation options, and using a new Comet API called Jabbify in an interactive demo.
Presented by Vlad Didenko and Don Albrecht at the April 2009 JS.Chi() meetup. A brief overview of the conference, the most interesting sessions we have seen and impressions from the exibition floor.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfPeter Spielvogel
Building better applications for business users with SAP Fiori.
• What is SAP Fiori and why it matters to you
• How a better user experience drives measurable business benefits
• How to get started with SAP Fiori today
• How SAP Fiori elements accelerates application development
• How SAP Build Code includes SAP Fiori tools and other generative artificial intelligence capabilities
• How SAP Fiori paves the way for using AI in SAP apps
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
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.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
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.
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.
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.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
2. What is the DOM?
DOM == Document Object Model
<p title=quot;The test paragraphquot;>This is a sample of some <b>HTML
you might<br>have</b> in your document</p>
The DOM tree:
3. Referencing the element nodes
document.getElementById(quot;id of divquot;)
document.getElementsByTagName(quot;divquot;)[indexOfDiv]
We could even walk the entire DOM tree from the
document object
window.document.childNodes[0].childNodes[1].childNodes[4]
4. Getting/Setting the attribute node
Easy way:
var title = element.getAttribute(quot;titlequot;);
element.setAttribute(quot;titlequot;, quot;This is an elementquot;);
OR:
Access the quot;attributesquot; array in each
element:
for( var x = 0; x < element.attributes.length; x++ ) {
if( element.attributes[x].nodeName.toLowerCase() == 'title' ) {
window.alert( 'The value of the 'title' attribute is: ' +
element.attributes[x].nodeValue );
}
}
5. Creating new nodes
var div= document.createElement(quot;divquot;);
var theTextOfDiv = document.createTextNode('Some content.');
div.appendChild(theTextOfTheDIv);
document.getElementById('someElementId').appendChild(div);
- You should always use this method instead of using innerHTML
when creating new nodes.
- If you're creating lots of DIVs, cloneNode(false) it instead of re-
creating it each time, its faster.
- innerHTML is faster but you should only use it if you're HTML is
safe, maybe when you're Ajax calls return HTML and you wanna
update an element.
6. Events
All this means nothing without Events. They give interactivity
to your page, without them we wouldn't be able to make
Javascript do something.
When the user does something an event takes place. We can
attach an event handler to certain HTML elements.
7. Event handling
<a href=quot;http://link.comquot; onclick=quot;alert('hi');quot;>link</a>
This way of registering event handlers to HTML elements is
bad, they should be set entirely with javascript.
element.onclick = doSomething;
Whenever the user clicks on the HTML element, the function
doSomething() is executed.
A distinct drawback is that the onclick property can contain
only one function. This becomes a problem when you want to
register multiple event handlers for one event.
9. Event order
If you have an element inside another element, and both
have an onclick Event, which one will fire first when you click
on them?
<div onclick=quot;doSomething();quot;>
<div onclick=quot;doSomething();quot;>Hello</div>
</div>
Two Models:
Event capturing: the outer element event takes place first.
This means it starts capturing events from the outer element.
Event bubbling: the inner element event takes place first. It
starts capturing events from the inner element.
You can decide which one to use through the addEventListener(). If
its last argument is true the event handler is set for the capturing
10. Stop Event propagation
You might want to stop event propagation from bubbling up
when you apply an event to the quot;documentquot; for example:
document element.onclick=doSomething;
document.onclick =
element defaultFunction;
You can stop the event propagation here, if you wish. If you
don’t the event bubbles up to defaultFunction(). If the user
clicks anywhere else defaultFunction() is also executed.
11. Turn Event propagation off
function doSomething(e) {
if (!e) var e = window.event;
e.cancelBubble = true;
if (e.stopPropagation) e.stopPropagation();
}
This stops all propagation of the event in the bubbling phase.
Stopping event propagation in the capturing phase is
impossible.
12. The quot;thisquot; keyword
In JavaScript this always refers to the “owner” of the function
we're executing, or rather, to the object that a function is a
method of.
function doSomething() {
alert(this);
}
When calling the doSomething() function, the owner of it is
the quot;windowquot;, therefore it will alert the window object.
Event registration takes care of the ownership, making the
HTML element (on which we are applying the Event) the
owner.
13. The quot;thisquot; keyword
Using inline event registration doesnt quot;copyquot; the function, it
just refers to it:
<element onclick=quot;doSomething()quot;>
in this case quot;onclickquot; is not the function doSomething, rather it
just refers to the function and tells it to run it. The quot;thisquot; in
doSomething() will refer to the window object once again.
function onclick() {
doSomething();
}