The document summarizes topics related to JavaScript basics and the HTML DOM. It discusses:
1) What JavaScript is and why it is used, including that it adds interactivity to HTML pages and is a scripting language that is usually embedded in HTML pages.
2) How and where to place JavaScript code, including using <script> tags and referencing external JavaScript files.
3) Key JavaScript language topics like variables, functions, conditional statements, and loops.
4) Common JavaScript events like onclick, onmouseover, and onsubmit and how they can be used.
5) JavaScript objects, including built-in objects like String and Date, and how to create custom objects using different approaches.
JavaScript is a scripting language designed for web pages that is used to add interactivity and dynamic behavior to HTML pages. It was invented in 1995 by Brendan Eich at Netscape and is now the most popular client-side scripting language on the internet. JavaScript code can be included within HTML pages using <script> tags and is interpreted by web browsers rather than compiled. It allows for manipulating HTML elements, writing to documents, validating forms, detecting browsers, and handling events.
jQuery is a JavaScript library that simplifies HTML document traversal, event handling, animating, and Ajax interactions. It allows you to write less code that does more. jQuery selects DOM elements using CSS-style selectors and provides methods for traversing, manipulating, and animating elements. Some key benefits of jQuery include writing concise code, cross-browser compatibility, and a large ecosystem of plugins.
The document describes the Universal Widget API (UWA) which aims to create widgets that work across multiple platforms without code changes. It outlines the basics of UWA including using a static XHTML file with CSS and JavaScript. It presents a skeleton structure for UWA widgets and provides examples including a fliptext widget and a fireplace widget. It also discusses replacing native JavaScript methods with UWA-specific equivalents and the Ajax methods available in the UWA.Data object.
the 5 layers of web accessibility - Open Web Camp IIDirk Ginader
Dirk Ginader, part of the Yahoo! Accessibility Taskforce, will talk about the “5 Layers of Web Accessibility”. He extents the commonly known 3 layers model consisting of HTML, CSS and JavaScript with 2 new layers for more accessibility. He shows how easy it can be to make a website or web application more accessible by following simple rules.
see:
http://openwebcamp.org/agenda/#5_layers_of_accessibility
The document discusses the JavaScript Browser Object Model (BOM) which allows access and manipulation of browser windows and screens. It describes common BOM objects like window, navigator, screen, location, and history that provide information about the browser and user environment. Examples are given showing how to use the window object to set timeouts and intervals, and the navigator object to detect the browser name and version.
jQuery is a JavaScript library that makes web development easier by simplifying common tasks like HTML/DOM manipulation, CSS manipulation, event handling, and Ajax interactions. It works by selecting elements and performing actions on them. Some key points covered include:
- jQuery selects elements using CSS-style selectors and allows manipulating them by adding or changing attributes, styles, and content.
- Common tasks like attaching event handlers, making Ajax calls, and animating elements are simplified in jQuery.
- jQuery has methods for traversing, filtering, and manipulating selected elements that reduce the need for complex JavaScript code.
- The jQuery library is included using a <script> tag and the jQuery code is wrapped
The document discusses Asynchronous JavaScript and XML (Ajax) and how it can be used to retrieve data from a server without reloading the entire web page. It provides an overview of Ajax fundamentals including the XMLHttpRequest object, DOM manipulation, and different data transport options. It also recommends using a JavaScript library to simplify making Ajax requests instead of writing raw XMLHttpRequest code.
AJAX allows web pages to load data from the server asynchronously in the background without reloading the page. It uses JavaScript to make requests to the server and update parts of the page with the response. jQuery simplifies AJAX with methods like $.get() that allow making GET requests and updating HTML. For example, an AJAX call could check username availability and update a form to display if a username is available or taken without reloading the page. Security precautions are needed when handling sensitive data with AJAX.
JavaScript is a scripting language designed for web pages that is used to add interactivity and dynamic behavior to HTML pages. It was invented in 1995 by Brendan Eich at Netscape and is now the most popular client-side scripting language on the internet. JavaScript code can be included within HTML pages using <script> tags and is interpreted by web browsers rather than compiled. It allows for manipulating HTML elements, writing to documents, validating forms, detecting browsers, and handling events.
jQuery is a JavaScript library that simplifies HTML document traversal, event handling, animating, and Ajax interactions. It allows you to write less code that does more. jQuery selects DOM elements using CSS-style selectors and provides methods for traversing, manipulating, and animating elements. Some key benefits of jQuery include writing concise code, cross-browser compatibility, and a large ecosystem of plugins.
The document describes the Universal Widget API (UWA) which aims to create widgets that work across multiple platforms without code changes. It outlines the basics of UWA including using a static XHTML file with CSS and JavaScript. It presents a skeleton structure for UWA widgets and provides examples including a fliptext widget and a fireplace widget. It also discusses replacing native JavaScript methods with UWA-specific equivalents and the Ajax methods available in the UWA.Data object.
the 5 layers of web accessibility - Open Web Camp IIDirk Ginader
Dirk Ginader, part of the Yahoo! Accessibility Taskforce, will talk about the “5 Layers of Web Accessibility”. He extents the commonly known 3 layers model consisting of HTML, CSS and JavaScript with 2 new layers for more accessibility. He shows how easy it can be to make a website or web application more accessible by following simple rules.
see:
http://openwebcamp.org/agenda/#5_layers_of_accessibility
The document discusses the JavaScript Browser Object Model (BOM) which allows access and manipulation of browser windows and screens. It describes common BOM objects like window, navigator, screen, location, and history that provide information about the browser and user environment. Examples are given showing how to use the window object to set timeouts and intervals, and the navigator object to detect the browser name and version.
jQuery is a JavaScript library that makes web development easier by simplifying common tasks like HTML/DOM manipulation, CSS manipulation, event handling, and Ajax interactions. It works by selecting elements and performing actions on them. Some key points covered include:
- jQuery selects elements using CSS-style selectors and allows manipulating them by adding or changing attributes, styles, and content.
- Common tasks like attaching event handlers, making Ajax calls, and animating elements are simplified in jQuery.
- jQuery has methods for traversing, filtering, and manipulating selected elements that reduce the need for complex JavaScript code.
- The jQuery library is included using a <script> tag and the jQuery code is wrapped
The document discusses Asynchronous JavaScript and XML (Ajax) and how it can be used to retrieve data from a server without reloading the entire web page. It provides an overview of Ajax fundamentals including the XMLHttpRequest object, DOM manipulation, and different data transport options. It also recommends using a JavaScript library to simplify making Ajax requests instead of writing raw XMLHttpRequest code.
AJAX allows web pages to load data from the server asynchronously in the background without reloading the page. It uses JavaScript to make requests to the server and update parts of the page with the response. jQuery simplifies AJAX with methods like $.get() that allow making GET requests and updating HTML. For example, an AJAX call could check username availability and update a form to display if a username is available or taken without reloading the page. Security precautions are needed when handling sensitive data with AJAX.
This document discusses JavaScript events. It defines an event as an action a script can respond to, such as clicks or keystrokes. Event handlers are functions assigned to events that run when the event occurs. Events follow a cycle of capturing, targeting, and bubbling. Common event types include mouse, keyboard, loading, selection, and other events. The document provides examples of using event handlers with buttons, images, and adding/removing event listeners.
The document provides an introduction to jQuery, explaining what it is, its benefits over traditional JavaScript, and how it can be used. Key points covered include:
- jQuery is a lightweight JavaScript library that makes client-side scripting easier by providing cross-browser compatibility and methods for selecting, manipulating, and traversing DOM elements.
- jQuery solves many cross-browser issues that exist with traditional JavaScript and allows unobtrusive JavaScript that separates behavior from content.
- jQuery simplifies many common tasks like DOM traversal and manipulation through methods like $.(), selectors, events, effects, and plugins. This allows easier and more readable code compared to traditional JavaScript.
- The document provides examples of how to use
This document discusses unobtrusive JavaScript and patterns for implementing it in web frameworks. It begins by outlining problems with server-side JavaScript generation and the proliferation of JavaScript frameworks. It then covers common patterns for unobtrusive JavaScript like double templating, just Ajax, and update panels. The document also explains how Rails implements unobtrusive JavaScript using drivers, data attributes, and remote forms. It concludes by discussing how these patterns and techniques could be adapted for ASP.NET MVC.
DHTML is not a language but a term that describes making dynamic and interactive web pages by combining HTML, JavaScript, CSS, and the HTML DOM. Events are user actions like mouse clicks or keyboard presses. Event handlers catch these events and execute code in response. There are different types of events for windows, mouse, keyboard, and forms. Events can be used with functions to trigger dynamic behaviors - for example, displaying an alert on the mouseover event or changing text on a click. Buttons and other elements can trigger functions through events to create interactive experiences.
This document provides an overview of JavaScript including:
- JavaScript is an interpreted programming language that allows adding interactivity to HTML pages.
- It is commonly used for client-side scripting of web pages in browsers.
- Core JavaScript concepts like variables, data types, operators, and functions are introduced.
- Different types of loops in JavaScript like for, for/in, while and do/while loops are explained.
- Best practices for including JavaScript code in HTML files using <script> tags are covered.
StHack 2014 - Mario "@0x6D6172696F" Heiderich - JSMVCOMFGStHack
JSMVCOMFG is a presentation by Mario Heiderich on looking at JavaScript MVC and templating frameworks. These frameworks are becoming popular and complex, often maintained by large corporations. They extend and abstract the DOM using custom elements, script templates, and data bindings. However, they also introduce security risks by allowing JavaScript execution from data attributes and encoded templates, bypassing XSS filters. Frameworks need to implement better sandboxing and separation of code and content to address these issues.
Get this Course
https://www.udemy.com/javascript-course-dom/?couponCode=SLIDESHARE
Document Object Model Power your websites make things happen online - JavaScript to create interactive web pages
Source code making it easy for you to try the code and experiment learning the code.
Challenges and tips to get you coding quickly.
Make you web pages come to life
DOM what it is
Element selection
Multiple element selection
Element manipulation - update content and select attributes
Elements and classes add remove and toggle
Traversing children and parents
Element style attribute
Challenge #1 image popup window
Create elements
Click events
Challenge #2 click event create elements
Challenge #3 click change background
Event Object
Key press event
Mouse move events
Challenge #4 - List items advanced remove,create element, click
Event bubbling and capturing
No libraries, no shortcuts just learning JavaScript making it DYNAMIC and INTERACTIVE web application.
JavaScript is a scripting language that adds interactivity to HTML pages. It works in all major browsers and is used to build dynamic web pages. JavaScript can react to events, modify HTML elements, validate forms, detect browsers, and write cookies. It is commonly placed in <script> tags within HTML pages or linked via external .js files. Comments are added to explain JavaScript code and prevent execution.
Monster JavaScript Course - 50+ projects and applicationsLaurence Svekis ✔
Get this Course
https://www.udemy.com/javascript-course-projects/?couponCode=SLIDESHARE
Portfolio builder loaded with projects and applications that you can use, extend on and enhance to add to your portfolio
JUST GOT BIGGER - more updates to come - YOU FOUND IT
Grow your portfolio - showcase what you can build with JavaScript
Learn JavaScript have fun with interactive and dynamic web applications.
Over 529 downloadable resources - 57 articles - 43+ hours on-demand video, 57 Sections
Over 614 HD video lessons
Over 51+ projects and web applications. Projects can be used as started projects to extend and enhance. All JavaScript focused.
4 downloadable ebook guides 200 pages and 3 x 60 pages - with code and resource links
No libraries JUST JAVASCRIPT and JAVASCRIPT DOM
This is the course you've been looking for..........
Everything you need to get started with JavaScript, expand your knowledge about using JavaScript, and more included.
It’s arrived, and bigger than expected!!!
For anyone who wants to supercharge their JavaScript learning - building and applying JavaScript to over 50 projects and challenges… this course is for YOU!!!!
From JavaScript beginners to all levels, course is presented in a fun interactive format that will challenge you. Move through the lessons of the course as you want to learn them, variety of ways to benefit from it. Learn alongside, try before you see the solution, try after you view the solution. It’s up to you! Unique format for learning encouraging you to try the code. Of course source code is included in every step of the way.
Most often asked for ARE PROJECTS - and this course delivers! Over 50 and will grow over time as more projects and challenges get added. You can select the projects you want to do or take them in order, it’s up to you.
Loaded with games and so many mini projects guaranteed to help you learn more about JavaScript and DOM manipulation. All JavaScript code no libraries or short cuts.
Explore how to apply JavaScript to create interactive and dynamic web content - that will impress your friends.
Extend on the projects and add them to your portfolio, to showcase skills you have learned.
Useful real world projects coded with simple JavaScript for developers of all levels.
No better way to learn than to try the code and produce something fun and useful with it. Learn to create amazing things with JavaScript bringing your web content to life.
This will keep you busy and provide you the opportunity to learn and experiment with code. Try it. All the projects are designed in a starter type format so that you can build on them and customize to make it your own.
Portfolio Builder 50+ projects
This course includes full introduction to coding with JavaScript, all core syntax and how to apply it to make things happen. Create your own code - loaded with challenges and code snippets.
The document discusses progressive enhancement with JavaScript and Ajax. It defines progressive enhancement as testing for support of different technologies like JavaScript, DOM, and objects, and providing alternative interfaces when something is not supported. It recommends testing for dependencies before using them, and separating interfaces from styles using CSS for flexibility. While CSS-only solutions seem appealing, JavaScript is more powerful and reliable for building complex, accessible interfaces. The key is enhancing interfaces thoughtfully to improve the user experience, not just for the sake of enhancement.
This document provides an overview of using JavaScript to add dynamic content and interactivity to web pages. It discusses generating HTML dynamically using document.write(), monitoring user events using event handlers like onclick, the basic syntax of JavaScript including dynamic typing, functions, objects and classes. It then gives examples of applications like determining browser window size, modifying images dynamically, and highlighting images as the mouse moves over them. The document is intended to teach core JavaScript programming concepts.
This document summarizes a presentation on unobtrusive JavaScript with jQuery. The presentation introduces JavaScript frameworks like jQuery and the concept of unobtrusive JavaScript. It discusses jQuery's core philosophy of simplifying interactions between HTML and JavaScript. The document outlines jQuery's API and popular plugins. It also covers lessons learned, including placing CSS at the top, JavaScript at the bottom, and assessing pages with Yslow. The presentation concludes with working examples and acknowledgments.
This document provides an overview of using JavaScript to add dynamic content and interactivity to web pages. It covers generating HTML dynamically with document.write(), monitoring user events with event handlers like onclick, the basic syntax of JavaScript including dynamic typing, functions, objects, and arrays. It also gives examples of applications like determining browser window size, modifying images dynamically, and highlighting images as the mouse moves over them.
Knockout.js is a JavaScript library that makes it easier to create dynamic and responsive user interfaces by binding a data model to HTML elements, automatically updating the UI when the data model changes. It provides declarative bindings, dependency tracking, templating, and other features to simplify building dynamic UIs using the MVVM pattern. Knockout.js works with any web framework, has no dependencies, and supports all major browsers.
This document provides an introduction to JavaScript events through examples. It demonstrates how mouseover and mouseout events can be used to display alerts and change images. It also shows how onclick events can alter background colors and call prompts. The document discusses using the document and window objects to manipulate page elements from JavaScript code embedded in HTML tags.
User Interface Development with jQuerycolinbdclark
A half-day workshop covering all aspects of user interface development with jQuery. Starts with a JavaScript refresher, followed by coverage of each major feature of jQuery. Real world code samples are included throughout.
Presented by Colin Clark and Justin Obara at the 2010 Jasig Conference in San Diego.
The document appears to be a presentation about using jQuery with SharePoint. It discusses open wireless access being available and encourages attendees to tweet about the session and blog. It then provides information about the presenter and their background as well as an outline of the topics to be covered in the presentation, including what jQuery is, how to deploy and develop with it, interacting with SharePoint and the DOM, reading and writing list data, using third party libraries, and demos.
The document describes React, a JavaScript library for building user interfaces. It introduces some key concepts of React including components, props, state, and the virtual DOM. Components are the building blocks of React apps and can be composed together. Props provide immutable data to components, while state provides mutable data. The virtual DOM allows React to efficiently update the real DOM by only changing what needs to be changed. Data flows unidirectionally in React from parent to child components via props, and state updates within a component are handled via setState().
The document provides an overview of the history and principles of graphic design. It discusses early examples of visual communication from cave paintings to the invention of writing systems. Key developments included Johannes Gutenberg's printing press and the establishment of typography. The document outlines important typefaces and designers that advanced principles like functionality, simplicity and optical spacing. It explores concepts such as dynamic planes, space, and the work of designers like Josef Muller-Brockman, László Moholy-Nagy, Paul Rand and Saul Bass that helped establish graphic design as an art form.
This document discusses JavaScript events. It defines an event as an action a script can respond to, such as clicks or keystrokes. Event handlers are functions assigned to events that run when the event occurs. Events follow a cycle of capturing, targeting, and bubbling. Common event types include mouse, keyboard, loading, selection, and other events. The document provides examples of using event handlers with buttons, images, and adding/removing event listeners.
The document provides an introduction to jQuery, explaining what it is, its benefits over traditional JavaScript, and how it can be used. Key points covered include:
- jQuery is a lightweight JavaScript library that makes client-side scripting easier by providing cross-browser compatibility and methods for selecting, manipulating, and traversing DOM elements.
- jQuery solves many cross-browser issues that exist with traditional JavaScript and allows unobtrusive JavaScript that separates behavior from content.
- jQuery simplifies many common tasks like DOM traversal and manipulation through methods like $.(), selectors, events, effects, and plugins. This allows easier and more readable code compared to traditional JavaScript.
- The document provides examples of how to use
This document discusses unobtrusive JavaScript and patterns for implementing it in web frameworks. It begins by outlining problems with server-side JavaScript generation and the proliferation of JavaScript frameworks. It then covers common patterns for unobtrusive JavaScript like double templating, just Ajax, and update panels. The document also explains how Rails implements unobtrusive JavaScript using drivers, data attributes, and remote forms. It concludes by discussing how these patterns and techniques could be adapted for ASP.NET MVC.
DHTML is not a language but a term that describes making dynamic and interactive web pages by combining HTML, JavaScript, CSS, and the HTML DOM. Events are user actions like mouse clicks or keyboard presses. Event handlers catch these events and execute code in response. There are different types of events for windows, mouse, keyboard, and forms. Events can be used with functions to trigger dynamic behaviors - for example, displaying an alert on the mouseover event or changing text on a click. Buttons and other elements can trigger functions through events to create interactive experiences.
This document provides an overview of JavaScript including:
- JavaScript is an interpreted programming language that allows adding interactivity to HTML pages.
- It is commonly used for client-side scripting of web pages in browsers.
- Core JavaScript concepts like variables, data types, operators, and functions are introduced.
- Different types of loops in JavaScript like for, for/in, while and do/while loops are explained.
- Best practices for including JavaScript code in HTML files using <script> tags are covered.
StHack 2014 - Mario "@0x6D6172696F" Heiderich - JSMVCOMFGStHack
JSMVCOMFG is a presentation by Mario Heiderich on looking at JavaScript MVC and templating frameworks. These frameworks are becoming popular and complex, often maintained by large corporations. They extend and abstract the DOM using custom elements, script templates, and data bindings. However, they also introduce security risks by allowing JavaScript execution from data attributes and encoded templates, bypassing XSS filters. Frameworks need to implement better sandboxing and separation of code and content to address these issues.
Get this Course
https://www.udemy.com/javascript-course-dom/?couponCode=SLIDESHARE
Document Object Model Power your websites make things happen online - JavaScript to create interactive web pages
Source code making it easy for you to try the code and experiment learning the code.
Challenges and tips to get you coding quickly.
Make you web pages come to life
DOM what it is
Element selection
Multiple element selection
Element manipulation - update content and select attributes
Elements and classes add remove and toggle
Traversing children and parents
Element style attribute
Challenge #1 image popup window
Create elements
Click events
Challenge #2 click event create elements
Challenge #3 click change background
Event Object
Key press event
Mouse move events
Challenge #4 - List items advanced remove,create element, click
Event bubbling and capturing
No libraries, no shortcuts just learning JavaScript making it DYNAMIC and INTERACTIVE web application.
JavaScript is a scripting language that adds interactivity to HTML pages. It works in all major browsers and is used to build dynamic web pages. JavaScript can react to events, modify HTML elements, validate forms, detect browsers, and write cookies. It is commonly placed in <script> tags within HTML pages or linked via external .js files. Comments are added to explain JavaScript code and prevent execution.
Monster JavaScript Course - 50+ projects and applicationsLaurence Svekis ✔
Get this Course
https://www.udemy.com/javascript-course-projects/?couponCode=SLIDESHARE
Portfolio builder loaded with projects and applications that you can use, extend on and enhance to add to your portfolio
JUST GOT BIGGER - more updates to come - YOU FOUND IT
Grow your portfolio - showcase what you can build with JavaScript
Learn JavaScript have fun with interactive and dynamic web applications.
Over 529 downloadable resources - 57 articles - 43+ hours on-demand video, 57 Sections
Over 614 HD video lessons
Over 51+ projects and web applications. Projects can be used as started projects to extend and enhance. All JavaScript focused.
4 downloadable ebook guides 200 pages and 3 x 60 pages - with code and resource links
No libraries JUST JAVASCRIPT and JAVASCRIPT DOM
This is the course you've been looking for..........
Everything you need to get started with JavaScript, expand your knowledge about using JavaScript, and more included.
It’s arrived, and bigger than expected!!!
For anyone who wants to supercharge their JavaScript learning - building and applying JavaScript to over 50 projects and challenges… this course is for YOU!!!!
From JavaScript beginners to all levels, course is presented in a fun interactive format that will challenge you. Move through the lessons of the course as you want to learn them, variety of ways to benefit from it. Learn alongside, try before you see the solution, try after you view the solution. It’s up to you! Unique format for learning encouraging you to try the code. Of course source code is included in every step of the way.
Most often asked for ARE PROJECTS - and this course delivers! Over 50 and will grow over time as more projects and challenges get added. You can select the projects you want to do or take them in order, it’s up to you.
Loaded with games and so many mini projects guaranteed to help you learn more about JavaScript and DOM manipulation. All JavaScript code no libraries or short cuts.
Explore how to apply JavaScript to create interactive and dynamic web content - that will impress your friends.
Extend on the projects and add them to your portfolio, to showcase skills you have learned.
Useful real world projects coded with simple JavaScript for developers of all levels.
No better way to learn than to try the code and produce something fun and useful with it. Learn to create amazing things with JavaScript bringing your web content to life.
This will keep you busy and provide you the opportunity to learn and experiment with code. Try it. All the projects are designed in a starter type format so that you can build on them and customize to make it your own.
Portfolio Builder 50+ projects
This course includes full introduction to coding with JavaScript, all core syntax and how to apply it to make things happen. Create your own code - loaded with challenges and code snippets.
The document discusses progressive enhancement with JavaScript and Ajax. It defines progressive enhancement as testing for support of different technologies like JavaScript, DOM, and objects, and providing alternative interfaces when something is not supported. It recommends testing for dependencies before using them, and separating interfaces from styles using CSS for flexibility. While CSS-only solutions seem appealing, JavaScript is more powerful and reliable for building complex, accessible interfaces. The key is enhancing interfaces thoughtfully to improve the user experience, not just for the sake of enhancement.
This document provides an overview of using JavaScript to add dynamic content and interactivity to web pages. It discusses generating HTML dynamically using document.write(), monitoring user events using event handlers like onclick, the basic syntax of JavaScript including dynamic typing, functions, objects and classes. It then gives examples of applications like determining browser window size, modifying images dynamically, and highlighting images as the mouse moves over them. The document is intended to teach core JavaScript programming concepts.
This document summarizes a presentation on unobtrusive JavaScript with jQuery. The presentation introduces JavaScript frameworks like jQuery and the concept of unobtrusive JavaScript. It discusses jQuery's core philosophy of simplifying interactions between HTML and JavaScript. The document outlines jQuery's API and popular plugins. It also covers lessons learned, including placing CSS at the top, JavaScript at the bottom, and assessing pages with Yslow. The presentation concludes with working examples and acknowledgments.
This document provides an overview of using JavaScript to add dynamic content and interactivity to web pages. It covers generating HTML dynamically with document.write(), monitoring user events with event handlers like onclick, the basic syntax of JavaScript including dynamic typing, functions, objects, and arrays. It also gives examples of applications like determining browser window size, modifying images dynamically, and highlighting images as the mouse moves over them.
Knockout.js is a JavaScript library that makes it easier to create dynamic and responsive user interfaces by binding a data model to HTML elements, automatically updating the UI when the data model changes. It provides declarative bindings, dependency tracking, templating, and other features to simplify building dynamic UIs using the MVVM pattern. Knockout.js works with any web framework, has no dependencies, and supports all major browsers.
This document provides an introduction to JavaScript events through examples. It demonstrates how mouseover and mouseout events can be used to display alerts and change images. It also shows how onclick events can alter background colors and call prompts. The document discusses using the document and window objects to manipulate page elements from JavaScript code embedded in HTML tags.
User Interface Development with jQuerycolinbdclark
A half-day workshop covering all aspects of user interface development with jQuery. Starts with a JavaScript refresher, followed by coverage of each major feature of jQuery. Real world code samples are included throughout.
Presented by Colin Clark and Justin Obara at the 2010 Jasig Conference in San Diego.
The document appears to be a presentation about using jQuery with SharePoint. It discusses open wireless access being available and encourages attendees to tweet about the session and blog. It then provides information about the presenter and their background as well as an outline of the topics to be covered in the presentation, including what jQuery is, how to deploy and develop with it, interacting with SharePoint and the DOM, reading and writing list data, using third party libraries, and demos.
The document describes React, a JavaScript library for building user interfaces. It introduces some key concepts of React including components, props, state, and the virtual DOM. Components are the building blocks of React apps and can be composed together. Props provide immutable data to components, while state provides mutable data. The virtual DOM allows React to efficiently update the real DOM by only changing what needs to be changed. Data flows unidirectionally in React from parent to child components via props, and state updates within a component are handled via setState().
The document provides an overview of the history and principles of graphic design. It discusses early examples of visual communication from cave paintings to the invention of writing systems. Key developments included Johannes Gutenberg's printing press and the establishment of typography. The document outlines important typefaces and designers that advanced principles like functionality, simplicity and optical spacing. It explores concepts such as dynamic planes, space, and the work of designers like Josef Muller-Brockman, László Moholy-Nagy, Paul Rand and Saul Bass that helped establish graphic design as an art form.
This slideshow provides an introduction to graphic design. It illustrates the growth of it, especially during the Web 2.0 age. This was presented by Viraj and Veena, our designers at MindTree Limited.
The slideshow uses images and examples from external sources. The respective owners hold the copyright.
The Great State of Design with CSS Grid Layout and FriendsStacy Kvernmo
This document discusses the importance of doing work that you love and believe is great. It includes a quote from Steve Jobs about finding truly satisfying work by doing what you believe is great work and loving what you do. The rest of the document provides examples of challenges, questions, and discussions that commonly come up for designers in their work.
JavaScript is one of the 3 languages all web developers must learn:
1. HTML to define the content of web pages
2. CSS to specify the layout of web pages
3. JavaScript to program the behavior of web pages
Downloading jQuery file from jQuery website.
Referring to jQuery file through Content Delivery Networks.
Google CDN
<script src=http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js>
</script>
Microsoft CDN
<script src=“http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.11.0.min.js”>
</script>
JavaScript is a scripting language that adds interactivity to HTML pages. It works in all major browsers and can be embedded directly into HTML. JavaScript code is executed by the browser in the sequence it is written. JavaScript statements can be grouped into blocks and functions. JavaScript can react to events like clicks or page loads, manipulate HTML elements, and read/write cookies. To insert JavaScript into an HTML page, use the <script> tag. Functions and events are commonly used together, where functions execute when events occur. JavaScript also includes conditional statements, loops, and popup boxes to display alerts, prompts, and confirmations to users.
This document outlines the modules and content covered in a JavaScript and ExtJS training course. Module 1 covers the basics of JavaScript, including elements of a JavaScript program, statements, functions, objects, arrays, and events. Module 2 provides an introduction to ExtJS and its fundamental classes. Module 3 continues ExtJS coverage, focusing on components, data stores, templates, and classes. Module 4 covers internationalization, drag and drop, common components like grids and trees, and application best practices in ExtJS. The objectives are to learn how to write JavaScript code using basic elements and create windows/dialog boxes, use built-in objects, handle events, manipulate forms, and integrate JavaScript with Java.
This document provides an overview of event handling in web development using JavaScript. It discusses what functions and event handlers are, and how they can be defined and used to handle user interactions on a webpage. Specifically, it explains how event handlers allow capturing events like mouse clicks or focus changes and executing JavaScript code in response. It provides examples of common event handlers like onClick, onMouseOver, onLoad, and onUnload, and how they can be used both inline in HTML tags or by calling JavaScript functions. The goal is to help readers understand how to use event handlers to make their webpages interactive.
This document provides an introduction to JavaScript and the Document Object Model (DOM). It discusses what JavaScript is, how it can be implemented into web pages, its syntax, data types, functions, and how it interacts with the DOM. JavaScript allows dynamic behavior and interactivity on web pages by accessing and modifying elements and properties of the DOM tree.
This document discusses JavaScript, including its origins and differences from JScript and ECMA Script. JavaScript was originally created by Netscape as LiveScript but was renamed for marketing purposes. It has since been standardized as ECMAScript. While similar, JavaScript and Java are different languages. JavaScript is commonly used to add interactivity to web pages through events like onClick, onMouseOver, and onLoad. These events can be used in internet marketing to engage users. Camel case is a common convention for naming JavaScript files.
This presentation is an effort to combine all the cool features present in Angular and provide a basic idea about how it would help a developer overcome some of the common issues faced in client side development.
javascript Event Handling and introduction to event.pptLalith86
This document provides an overview of event handling in JavaScript. It discusses how event handlers allow programs to capture and respond to events, making them event-driven. It describes two methods for handling events - inline JavaScript and defining functions in the head. Common event handlers like onClick, onMouseOver, onFocus, onBlur, onLoad and onUnload are presented along with examples. The document aims to help readers understand the concept and benefits of event handlers and write simple programs using them.
JavaScript was originally named Mocha but was renamed LiveScript and then JavaScript. It is a lightweight, interpreted programming language designed for creating network-centric and browser-based applications. JavaScript can be used for client-side scripting through features like popup boxes and event handling, and for server-side scripting by running JavaScript code on the server with Node.js. It includes basic datatypes, operators, control flows, and built-in objects for manipulating the browser and its DOM.
Client-side scripting is performed using JavaScript to generate code that runs in the browser without server processing. JavaScript is used to create dynamic and interactive web pages by adding functionality and behaviors. It is the most commonly used programming language for building websites. JavaScript allows client-side validation, user notifications, simple calculations and greater control of the web page interface.
This document provides an introduction to JavaScript and covers topics such as:
- JavaScript allows for interactivity on web pages by manipulating the browser and reacting to user actions.
- JavaScript code is embedded within HTML pages and executed on the client-side by the browser.
- Common JavaScript concepts covered include variables, functions, scope, events, and form validation.
- JavaScript can be used to validate user input, perform calculations, and modify the DOM in response to events.
The document provides an overview of developing high performance web applications, focusing on optimizing front-end performance. It discusses why front-end performance matters, and provides best practices for optimizing page load time, developing responsive interfaces, and efficiently loading and executing JavaScript. The document also covers DOM scripting techniques, tools for profiling and analyzing performance, and how the performance monitoring service Gomez can be extended to better measure client-side metrics.
This document provides an overview of using JavaScript to add dynamic content and interactivity to web pages. It discusses generating HTML dynamically with document.write, monitoring user events like clicks with event handlers, basic JavaScript syntax including objects and functions, and applications such as modifying images, extracting document info, and adjusting content based on browser window size. Examples are provided throughout to demonstrate key JavaScript concepts.
The document provides an outline and introduction to JavaScript concepts including variables, functions, conditions, loops, pop-up boxes, objects, and the Document Object Model (DOM). It discusses tasks performed by client-side scripts like form validation, event handling, and dynamic page updates. It also compares client-side and server-side scripting, noting that client-side scripts execute on the browser and allow for interactivity but cannot access local files or databases.
This document provides an overview of JavaScript, including:
- JavaScript is a client-side scripting language designed for web pages, created by Brendan Eich in 1995.
- It can modify HTML content, respond to events, validate forms, and detect browser capabilities. JavaScript code can reside in external files or HTML tags.
- Key JavaScript concepts include objects, properties, events, functions, variables, and operators. Objects represent elements like windows and forms. Properties modify objects. Events trigger JavaScript code. Functions perform tasks. Variables store values. Operators manipulate values.
This document provides an introduction to dynamic HTML (DHTML) and JavaScript development. It defines DHTML as a combination of HTML, CSS, and JavaScript that allows web pages to react and change in response to user actions. It discusses how JavaScript enables dynamic behavior and interactivity on web pages by handling events, modifying HTML elements and the DOM tree, and performing other tasks. It also covers common JavaScript concepts like functions, objects, and syntax as well as built-in browser objects and timers.
JavaScript was designed to add interactivity to HTML pages. It is a scripting language that is usually embedded directly into HTML pages and allows for dynamic text, event handling, reading/writing HTML elements, and validating form data. JavaScript supports both client-side and server-side scripting and was originally developed by Netscape under the name LiveScript before being renamed. It provides programming capabilities to HTML authors and allows for dynamic content, user interaction, and validation without server requests.
This document provides an introduction to JavaScript and the Document Object Model (DOM). It discusses how JavaScript can be used to dynamically manipulate HTML pages by accessing and modifying the DOM. The DOM represents an HTML or XML document as a tree structure consisting of nodes, and JavaScript can select nodes and modify their content, attributes, and styling. The document also explains how to create a DOM representation of an XML document using JavaScript and the XMLHttpRequest object.
This document provides a help and tutorial for TopStyle Pro version 3.11. It covers getting started with TopStyle, editing style sheets and HTML/XHTML, working with colors, previews, validation, site management, reports, mappings, customization, and third-party integration. It also includes appendices on CSS basics and tips, TopStyle tips and tricks, style sheet resources, keyboard shortcuts, and regular expressions.
TopStyle Help & <b>Tutorial</b>tutorialsruby
This document provides a table of contents for the TopStyle Pro Help & Tutorial, which teaches how to use the TopStyle software for editing style sheets and HTML/XHTML documents. It lists over 50 sections that provide explanations and instructions for features like creating and opening files, editing styles, working with colors, previews, validation, site management, reports and customizing the software. The document was created by Giampaolo Bellavite from the online help provided with TopStyle version 3.11.
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>tutorialsruby
This document provides the course outline for IMD 210 Fundamentals of Scripting Languages at The Art Institute of Atlanta during the Spring 2005 quarter. The course focuses on integrating programming concepts with interface design using scripting languages like JavaScript and CSS. It will cover topics like DOM, CSS layout, JavaScript variables, conditionals, and events. Students will complete 4 assignments including redesigning existing websites, and there will be weekly quizzes, a midterm, and final exam. The course is worth 4 credits and meets once a week for class and lab.
This document provides the course outline for IMD 210 Fundamentals of Scripting Languages at The Art Institute of Atlanta during the Spring 2005 quarter. The course focuses on integrating programming concepts with interface design using scripting languages like JavaScript and CSS. It will cover topics like DOM, CSS layout, JavaScript variables, conditionals, and events. Students will complete 4 assignments including redesigning existing websites, and there will be weekly quizzes, a midterm, and final exam. The course is worth 4 credits and meets once a week for class and lab.
The group aims to bridge gaps between peer-to-peer database architectures and scaling multimedia information retrieval. They develop a probabilistic multimedia database system with abstraction layers for applications and researchers. They also research challenges of peer-to-peer networks for distributed data management. Both lines are supported by the MonetDB platform to exploit custom hardware and adaptive query optimization. The goal is a modular solution linking theoretical optimal solutions to application demands under resource limitations.
Standardization and Knowledge Transfer – INS0tutorialsruby
The group aims to bridge gaps between peer-to-peer database architectures and scaling multimedia information retrieval. They develop a probabilistic multimedia database system with abstraction layers and a flexible model. They also research challenges of peer-to-peer networks for distributed data management. Both lines are supported by the MonetDB platform to exploit custom hardware and adaptive query optimization. The goal is a modular solution linking theoretical optimal solutions to application demands under resource limitations.
This document provides an introduction to converting HTML documents to XHTML, including the basic syntax changes needed like making all tags lowercase and closing all tags. It provides examples of correct XHTML markup for different tags. It also explains the new DOCTYPE declaration and shows a sample well-formed XHTML document incorporating all the discussed changes. Resources for learning more about XHTML are listed at the end.
This document provides an introduction to converting HTML documents to XHTML, including the basic syntax changes needed like making all tags lowercase and closing all tags. It provides examples of correct XHTML markup for different tags. It also explains the new DOCTYPE declaration and shows a sample well-formed XHTML document incorporating all the discussed changes. Resources for learning more about XHTML are listed at the end.
XHTML is a markup language that provides structure and semantics to web pages. It is based on XML and is more strict than HTML. XHTML pages must have a document type definition, html and head tags, and a body where the visible content goes. Common XHTML tags include paragraphs, lists, links, images, and divisions to logically separate content. While XHTML provides structure, CSS is used to style pages and control visual presentation by defining rules for tags. CSS rules are defined in external style sheets to keep presentation separate from structure and content.
XHTML is a markup language that provides structure and semantics to web pages. It is based on XML and is more strict than HTML. XHTML pages must have a document type definition, html and head tags, and a body where the visible content goes. Common XHTML tags include paragraphs, lists, links, images, and divisions to logically separate content. While XHTML provides structure, CSS is used to style pages and control visual presentation through rules that target specific XHTML elements.
This document discusses how to create and use external cascading style sheets (CSS) in Dreamweaver. It provides steps to:
1. Open the CSS Styles tab in Dreamweaver and create a new external CSS stylesheet using a sample text style.
2. Save the stylesheet and link it to a new HTML page to style elements like headings, text sizes, and boxes.
3. Edit existing styles by selecting a tag in the CSS Styles panel and modifying properties directly, or by clicking the tag and using the pencil icon to edit in a window. This allows customizing styles globally across all linked pages.
This document provides an overview of how to create and use cascading style sheets (CSS) in Dreamweaver. It describes the different types of style sheets, including external and internal style sheets. It outlines the steps to create an external style sheet in Dreamweaver using the CSS Styles panel and provides instructions for linking the external style sheet to an HTML page. The document demonstrates how to experiment with predefined styles and how to edit, add, and delete styles in the CSS stylesheet.
This document appears to be a weekly update from an intro to computer science course. It includes summaries of classmates' demographics, comfort levels, and prior experience. It also discusses time spent on problem sets and recommends upcoming courses in CS51 and CS61. Finally, it recommends reading on TCP/IP, HTTP, XHTML, CSS, PHP, SQL and using the bulletin board for questions.
This document appears to be a weekly update from an intro to computer science course. It includes summaries of classmates' demographics, comfort levels, and prior experience. It also discusses time spent on problem sets and recommends upcoming courses in CS51 and CS61. Finally, it recommends reading on topics like TCP/IP, HTTP, XHTML, CSS, PHP, SQL and using bulletin boards, and includes images related to these topics.
The document discusses how to use Cascading Style Sheets (CSS) with Corvid Servlet Runtime templates to control formatting and layout. CSS allows separating design from content, making templates simpler and easier to maintain. It also enables adapting appearance for different devices. The document provides examples of using CSS classes to style template elements and explains how to set up a demo system using the included CSS and templates.
The document discusses how to use Cascading Style Sheets (CSS) with Corvid Servlet Runtime templates to control formatting and layout. CSS allows separating design from content, making templates simpler and easier to maintain. It also enables customization of appearance for different devices. The document provides examples of how to apply CSS classes and rules to Corvid template elements to control fonts, colors, positioning and more.
The document provides an introduction to CSS and how it works with HTML to control the presentation and styling of web page content. It explains basic CSS concepts like selectors, properties and values, and how CSS rules are used to target specific HTML elements and style them. Examples are given of common CSS properties and selectors and how they can be used to style elements and format the layout of web pages.
The document introduces CSS and how it works with HTML to separate content from presentation, allowing the styling of web pages through rules that target HTML elements. It explains CSS syntax and various selectors like type, class, ID, and descendant selectors. Examples are provided of how CSS can be used to style properties like color, font, padding, and layout of elements on a page.
Cascading Style Sheets (CSS) allow users to define how HTML elements are presented on a page. CSS enables changing the appearance and layout of an entire website by editing just one CSS file. CSS uses selectors to apply styles to HTML elements via properties and values. Styles can be defined internally in HTML or externally in CSS files. CSS can control text formatting, colors, spacing, positioning and more to achieve visual consistency across web pages.
Cascading Style Sheets (CSS) allow users to define how HTML elements are presented on a page. CSS enables changing the appearance and layout of an entire website by editing just one CSS file. CSS uses selectors to apply styles to HTML elements via properties and values. Styles can be defined internally in HTML or externally in CSS files. CSS can control text formatting, colors, spacing, positioning and more to achieve visual consistency across web pages.
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc
How does your privacy program stack up against your peers? What challenges are privacy teams tackling and prioritizing in 2024?
In the fifth annual Global Privacy Benchmarks Survey, we asked over 1,800 global privacy professionals and business executives to share their perspectives on the current state of privacy inside and outside of their organizations. This year’s report focused on emerging areas of importance for privacy and compliance professionals, including considerations and implications of Artificial Intelligence (AI) technologies, building brand trust, and different approaches for achieving higher privacy competence scores.
See how organizational priorities and strategic approaches to data security and privacy are evolving around the globe.
This webinar will review:
- The top 10 privacy insights from the fifth annual Global Privacy Benchmarks Survey
- The top challenges for privacy leaders, practitioners, and organizations in 2024
- Key themes to consider in developing and maintaining your privacy program
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
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.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
Pushing the limits of ePRTC: 100ns holdover for 100 daysAdtran
At WSTS 2024, Alon Stern explored the topic of parametric holdover and explained how recent research findings can be implemented in real-world PNT networks to achieve 100 nanoseconds of accuracy for up to 100 days.
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Speck&Tech
ABSTRACT: A prima vista, un mattoncino Lego e la backdoor XZ potrebbero avere in comune il fatto di essere entrambi blocchi di costruzione, o dipendenze di progetti creativi e software. La realtà è che un mattoncino Lego e il caso della backdoor XZ hanno molto di più di tutto ciò in comune.
Partecipate alla presentazione per immergervi in una storia di interoperabilità, standard e formati aperti, per poi discutere del ruolo importante che i contributori hanno in una comunità open source sostenibile.
BIO: Sostenitrice del software libero e dei formati standard e aperti. È stata un membro attivo dei progetti Fedora e openSUSE e ha co-fondato l'Associazione LibreItalia dove è stata coinvolta in diversi eventi, migrazioni e formazione relativi a LibreOffice. In precedenza ha lavorato a migrazioni e corsi di formazione su LibreOffice per diverse amministrazioni pubbliche e privati. Da gennaio 2020 lavora in SUSE come Software Release Engineer per Uyuni e SUSE Manager e quando non segue la sua passione per i computer e per Geeko coltiva la sua curiosità per l'astronomia (da cui deriva il suo nickname deneb_alpha).
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
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
How to Get CNIC Information System with Paksim Ga.pptxdanishmna97
Pakdata Cf is a groundbreaking system designed to streamline and facilitate access to CNIC information. This innovative platform leverages advanced technology to provide users with efficient and secure access to their CNIC details.
Full-RAG: A modern architecture for hyper-personalizationZilliz
Mike Del Balso, CEO & Co-Founder at Tecton, presents "Full RAG," a novel approach to AI recommendation systems, aiming to push beyond the limitations of traditional models through a deep integration of contextual insights and real-time data, leveraging the Retrieval-Augmented Generation architecture. This talk will outline Full RAG's potential to significantly enhance personalization, address engineering challenges such as data management and model training, and introduce data enrichment with reranking as a key solution. Attendees will gain crucial insights into the importance of hyperpersonalization in AI, the capabilities of Full RAG for advanced personalization, and strategies for managing complex data integrations for deploying cutting-edge AI solutions.
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.
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.
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
1. JavaScript Basics &
HTML DOM
Sang Shin
Java Technology Architect
Sun Microsystems, Inc.
sang.shin@sun.com
www.javapassion.com
2. Disclaimer & Acknowledgments
• Even though Sang Shin is a full-time employee of
Sun Microsystems, the contents here are created as
his own personal endeavor and thus does not
necessarily reflect any official stance of Sun
Microsystems on any particular technology
• Acknowledgments
> The contents of this presentation was created from JavaScript
tutorial from www.w3cschools.com
2
3. Topics
• What is and Why JavaScript?
• How and Where do you place JavaScript code?
• JavaScript language
• JavaScript functions
• JavaScript events
• JavaScript objects
• JavaScript HTML DOM objects
• Closure (need to be added)
3
5. What is JavaScript?
• Was designed to add interactivity to HTML pages
• Is a scripting language (a scripting language is a
lightweight programming language)
• JavaScript code is usually embedded directly into
HTML pages
• JavaScript is an interpreted language (means that
scripts execute without preliminary compilation)
5
6. What can a JavaScript do?
• JavaScript gives HTML designers a programming
tool
• JavaScript can put dynamic text into an HTML page
• JavaScript can react to events
• JavaScript can read and write HTML elements
• JavaScript can be used to validate input data
• JavaScript can be used to detect the visitor's
browser
• JavaScript can be used to create cookies
6
8. How to put a JavaScript code into
an HTML page?
• Use the <script> tag (also use the type attribute to define the
scripting language)
<html>
<head>
<script type="text/javascript">
...
</script>
</head>
<body>
<script type="text/javascript">
...
</script>
</body>
</html> 8
9. Where Do You Place Scripts?
• Scripts can be in the either <head> section or
<body> section
• Convention is to place it in the <head> section
<html>
<head>
<script type="text/javascript">
....
</script>
</head>
9
10. Referencing External JavaScript
File
• Scripts can be provided locally or remotely
accessible JavaScript file using src attribute
<html>
<head>
<script language="JavaScript"
type="text/javascript"
src="http://somesite/myOwnJavaScript.js">
</script>
<script language="JavaScript"
type="text/javascript"
src="myOwnSubdirectory/myOwn2ndJavaScript.js">
</script>
10
12. JavaScript Variable
• You create a variable with or without the var
statement
var strname = some value
strname = some value
• When you declare a variable within a function, the
variable can only be accessed within that function
• If you declare a variable outside a function, all the
functions on your page can access it
• The lifetime of these variables starts when they are
declared, and ends when the page is closed
12
13. JavaScript Popup Boxes
• Alert box
> User will have to click "OK" to proceed
> alert("sometext")
• Confirm box
> User will have to click either "OK" or "Cancel" to proceed
> confirm("sometext")
• Prompt box
> User will have to click either "OK" or "Cancel" to proceed after
entering an input value
> prompt("sometext","defaultvalue")
13
16. JavaScript Funcitons
• A JavaScript function contains some code that will
be executed only by an event or by a call to that
function
> To keep the browser from executing a script as soon as the
page is loaded, you can write your script as a function
• You may call a function from anywhere within the
page (or even from other pages if the function is
embedded in an external .js file).
• Functions can be defined either <head> or <body>
section
> As a convention, they are typically defined in the <head>
section 16
17. Example: JavaScript Function
<html>
<head>
<script type="text/javascript">
// If alert("Hello world!!") below had not been written within a
// function, it would have been executed as soon as the page gets loaded.
function displaymessage() {
alert("Hello World!")
}
</script>
</head>
<body>
<form>
<input type="button" value="Click me!"
onclick="displaymessage()" >
</form>
</body>
</html>
17
19. Events & Event Handlers
• Every element on a web page has certain events
which can trigger invocation of event handlers
• Attributes are inserted into HTML tags to define
events and event handlers
• Examples of events
> A mouse click
> A web page or an image loading
> Mousing over a hot spot on the web page
> Selecting an input box in an HTML form
> Submitting an HTML form
> A keystroke 19
20. Events
• onabort - Loading of an image is interrupted
• onblur - An element loses focus
• onchange - The content of a field changes
• onclick - Mouse clicks an object
• ondblclick - Mouse double-clicks an object
• onerror - An error occurs when loading a document
or an image
• onfocus - An element gets focus
• onkeydown - A keyboard key is pressed
20
21. Events
• onkeypress - A keyboard key is pressed or held down
• onkeyup - A keyboard key is released
• onload - A page or an image is finished loading
• onmousedown - A mouse button is pressed
• onmousemove - The mouse is moved
• onmouseout - The mouse is moved off an element
• onmouseover - The mouse is moved over an element
• onmouseup - A mouse button is released
21
22. Events
• onreset - The reset button is clicked
• onresize - A window or frame is resized
• onselect - Text is selected
• onsubmit - The submit button is clicked
• onunload - The user exits the page
22
23. onload & onUnload Events
• The onload and onUnload events are triggered when
the user enters or leaves the page
• The onload event is often used to check the visitor's
browser type and browser version, and load the
proper version of the web page based on the
information
• Both the onload and onUnload events are also often
used to deal with cookies that should be set when a
user enters or leaves a page.
23
24. onFocus, onBlur and onChange
• The onFocus, onBlur and onChange events are
often used in combination with validation of form
fields.
• Example: The checkEmail() function will be called
whenever the user changes the content of the field:
<input type="text" size="30"
id="email" onchange="checkEmail()">;
24
25. Example & Demo: onblur
<html>
<head>
<script type="text/javascript">
function upperCase() {
var x=document.getElementById("fname").value
document.getElementById("fname").value=x.toUpperCase()
}
</script>
</head>
<body>
Enter your name:
<input type="text" id="fname" onblur="upperCase()">
</body>
</html>
25
26. onSubmit
• The onSubmit event is used to validate all form
fields before submitting it.
• Example: The checkForm() function will be called
when the user clicks the submit button in the form. If
the field values are not accepted, the submit should
be canceled. The function checkForm() returns
either true or false. If it returns true the form will be
submitted, otherwise the submit will be cancelled:
<form method="post" action="xxx.html"
onsubmit="return checkForm()">
26
27. Example & Demo: onSubmit
<html>
<head>
<script type="text/javascript">
function validate() {
// return true or false based on validation logic
}
</script>
</head>
<body>
<form action="tryjs_submitpage.htm" onsubmit="return validate()">
Name (max 10 chararcters): <input type="text" id="fname" size="20"><br />
Age (from 1 to 100): <input type="text" id="age" size="20"><br />
E-mail: <input type="text" id="email" size="20"><br />
<br />
<input type="submit" value="Submit">
</form>
</body>
</html>
27
28. onMouseOver and onMouseOut
• onMouseOver and onMouseOut are often used to
create "animated" buttons.
• Below is an example of an onMouseOver event. An
alert box appears when an onMouseOver event is
detected:
<a href="http://www.w3schools.com"
onmouseover="alert('An onMouseOver event');return false">
<img src="w3schools.gif" width="100" height="30">
</a>
28
30. JavaScript Object
• JavaScript is an Object Oriented Programming (OOP)
language
• A JavaScript object has properties and methods
> Example: String JavaScript object has length property and
toUpperCase() method
<script type="text/javascript">
var txt="Hello World!"
document.write(txt.length)
document.write(txt.toUpperCase())
</script>
30
32. JavaScript Object vs. Java Object
• Simlarities
> Both has properties and methods
• Differences
> JavaScript object can be dynamically typed while Java object
is statically typed
> In JavaScript, properties and methods are dynamically added
32
34. Creating Your Own JavaScript Objects
• 3 different ways
> Create a direct instance of an object by using built-in
constructor for the Object class
> Create a template (Constructor) first and then create an
instance of an object from it
> Create object instance as Hash Literal
34
35. Option 1: Creating a Direct Instance
of a JavaScript Object
• By invoking the built-in constructor for the Object class
personObj=new Object(); // Initially empty with no properties or methods
• Add properties to it
personObj.firstname="John";
personObj.age=50;
• Add an anonymous function to the personObj
personObj.tellYourage=function(){
alert(“This age is ” + this.age);
}
// You can call then tellYourage function as following
personObj.tellYourage();
35
36. Option 1: Creating a Direct Instance
of a JavaScript Object
• Add a pre-defined function
function tellYourage(){
alert(“The age is” + this.age);
}
personObj.tellYourage=tellYourage;
• Note that the following two lines of code are doing
completely different things
// Set property with a function
personObj.tellYourage=tellYourage;
// Set property with returned value of the function
personObj.tellYourage=tellYourage();
36
37. Option 2: Creating a template of a
JavaScript Object
• The template defines the structure of a JavaScript
object in the form of a function
• You can think of the template as a constructor
function Person(firstname,lastname,age,eyecolor) {
this.firstname=firstname;
this.lastname=lastname;
this.age=age;
this.tellYourage=function(){
alert(“This age is ” + this.age);
}
}
37
38. Option 2: Creating a template of a
JavaScript Object
• Once you have the template, you can create new
instances of the object
myFather=new Person("John","Doe",50,"blue");
myMother=new Person("Sally","Rally",48,"green");
• You can add new properties and functions to new
objects
myFather.newField = “some data”;
myFather.myfunction = function() {
alert(this["fullName"] + ” is ” + this.age);
}
38
39. Option 3: Creating JavaScript
Object as a Hash Literal
• Create personObj JavaScript object
var personObj = {
firstname: "John",
lastname: "Doe",
age: 50,
tellYourage: function () {
alert(“The age is ” + this.age );
}
tellSomething: function(something) {
alert(something);
}
}
personObj.tellYourage();
personObj.tellSomething(“Life is good!”); 39
41. JavaScript Object is an Associative
Array (Hash)
• A JavaScript object is essentially an associative array (hash)
with fields and methods, which are keyed by name
{
firstname: "John",
lastname: "Doe",
age: 50,
tellYourage: function () {
alert(“The age is ” + this.age );
},
tellSomething: function(something) {
alert(something);
}
}
• The following two lines of code are semantically
equivalent
myObject.myfield = “something”;
myObject['myfield'] = “something”;
41
43. JavaScript has No built-in concept
of Inheritance
• JavaScript has a concept of objects and classes
(like in Java) but no built-in concept of inheritance
(unlike in Java)
> Every JavaScript object is really an instance of the same base
class, a class that is capable of binding member fields and
functions to itself at runtime
43
45. prototype
• A prototype is a property of every JavaScript object
• Functions and properties can be associated with a
constructor's property
• When a function is invoked with new keyword, all
properties and methods of the prototype for the
function are attached to the resulting object
45
46. prototype
// Constructor of the MyObject
function MyObject(name, size){
this.name=name;
this.size=size;
}
// Add a function to the prototype
MyObject.prototype.tellSize=function{
alert(“size of “ + this.name+” is “ + this.size);
}
// Create an instance of the object. The new object has tellSize() method.
var myObj=new MyObject(“Sang”, “30 inches”);
myObj.tellSize();
46
48. A function is a first-class
JavaScript Object
• Functions are a bit like Java methods
> They have arguments and return values
• A function is a first-class object in JavaScript (unlike
in Java)
> Can be considered as a descendant of Object
> Can do everything a regular JavaScript object can do such as
storing properties by name
> Function objects can have other function objects as methods
48
49. A function can take Variable
arguments
• You can call myfunction() or myfunction(20)
function myfunction(value){
if (value){
this.area=value;
}
return this.area;
}
49
52. HTML DOM
• The HTML DOM defines a standard set of objects
for HTML, and a standard way to access and
manipulate HTML documents
• All HTML elements, along with their containing text
and attributes, can be accessed through the DOM.
> The contents can be modified or deleted, and new elements
can be created.
• The HTML DOM is platform and language
independent
> It can be used by any programming language like Java,
JavaScript, and VBScript
52
53. HTML DOM Objects
• Anchor object
• Document object
• Event object
• Form and Form Input object
• Frame, Frameset, and IFrame objects
• Image object
• Location object
• Navigator object
53
54. HTML DOM Objects
• Option and Select objects
• Screen object
• Table, TableHeader, TableRow, TableData objects
• Window object
54
56. Document Object: Write text to the
output
<html>
<body>
<script type="text/javascript">
document.write("Hello World!")
</script>
</body>
</html>
56
57. Document Object: Write text with
Formatting to the output
<html>
<body>
<script type="text/javascript">
document.write("<h1>Hello World!</h1>")
</script>
</body>
</html>
57
58. Document Object: Use
getElementById()
<html>
<head>
<script type="text/javascript">
function getElement() {
var x=document.getElementById("myHeader")
alert("I am a " + x.tagName + " element")
}
</script>
</head>
<body>
<h1 id="myHeader" onclick="getElement()">Click to see what element I am!</h1>
</body>
</html>
58
59. Document Object: Use
getElementsByName()
<html>
<head>
<script type="text/javascript">
function getElements() {
var x=document.getElementsByName("myInput")
alert(x.length + " elements!")
}
</script>
</head>
<body>
<input name="myInput" type="text" size="20"><br />
<input name="myInput" type="text" size="20"><br />
<input name="myInput" type="text" size="20"><br />
<br />
<input type="button" onclick="getElements()" value="How many elements named
'myInput'?">
</body>
</html>
59
60. Document Object: Return the innerHTML
of the first anchor in a document
<html>
<body>
<a name="first">First anchor</a><br />
<a name="second">Second anchor</a><br />
<a name="third">Third anchor</a><br />
<br />
InnerHTML of the first anchor in this document:
<script type="text/javascript">
document.write(document.anchors[0].innerHTML)
</script>
</body>
</html>
60
61. Document Object: Access an item in a
collection
<html>
<body>
<form id="Form1" name="Form1">
Your name: <input type="text">
</form>
<form id="Form2" name="Form2">
Your car: <input type="text">
</form>
<p>
To access an item in a collection you can either use the number or the name of the item:
</p>
<script type="text/javascript">
document.write("<p>The first form's name is: " + document.forms[0].name + "</p>")
document.write("<p>The first form's name is: " + document.getElementById("Form1").name
+ "</p>")
</script>
</body> 61
63. Event Object: What are the
coordinates of the cursor?
<html>
<head>
<script type="text/javascript">
function show_coords(event) {
x=event.clientX
y=event.clientY
alert("X coords: " + x + ", Y coords: " + y)
}
</script>
</head>
<body onmousedown="show_coords(event)">
<p>Click in the document. An alert box will alert the x and y coordinates of the
cursor.</p>
</body>
</html>
63
64. Event Object: What is the unicode
of the key pressed?
<html>
<head>
<script type="text/javascript">
function whichButton(event) {
alert(event.keyCode)
}
</script>
</head>
<body onkeyup="whichButton(event)">
<p><b>Note:</b> Make sure the right frame has focus when trying this example!</p>
<p>Press a key on your keyboard. An alert box will alert the unicode of the key
pressed.</p>
</body>
</html>
64
65. Event Object: Which element was
clicked?
<html>
<head>
<script type="text/javascript">
function whichElement(e) {
var targ
if (!e) var e = window.event
if (e.target) targ = e.target
else if (e.srcElement) targ = e.srcElement
if (targ.nodeType == 3) // defeat Safari bug
targ = targ.parentNode
var tname
tname=targ.tagName
alert("You clicked on a " + tname + " element.")
}
</script>
</head>
<body onmousedown="whichElement(event)">
<p>Click somewhere in the document. An alert box will alert the tag name of the element you clicked on.</p>
<h3>This is a header</h3>
<p>This is a paragraph</p>
<img border="0" src="ball16.gif" width="29" height="28" alt="Ball">
</body>
65
66. Event Object: Which event type
occurred?
<html>
<head>
<script type="text/javascript">
function whichType(event) {
alert(event.type)
}
</script>
</head>
<body onmousedown="whichType(event)">
<p>
Click on the document. An alert box will alert which type of event occurred.
</p>
</body>
</html>
66