UNIT - III. Every element in a document tree refers to a Node object. Some nodes of the tree are

Similar documents
JavaScript and XHTML. Prof. D. Krupesha, PESIT, Bangalore

LECTURE-3. Exceptions JS Events. CS3101: Programming Languages: Javascript Ramana Isukapalli

Pearson Education Limited Edinburgh Gate Harlow Essex CM20 2JE England and Associated Companies throughout the world

JAVASCRIPT BASICS. Handling Events In JavaScript. In programing, event-driven programming could be a programming

New Perspectives on Creating Web Pages with HTML. Tutorial Objectives

Events: another simple example

Fundamentals of Website Development

Key features. Nothing to do with java It is the Client-side scripting language Designed to add interactivity to HTML pages

HttpServlet ( Class ) -- we will extend this class to handle GET / PUT HTTP requests

JavaScript Handling Events Page 1

INLEDANDE WEBBPROGRAMMERING MED JAVASCRIPT INTRODUCTION TO WEB PROGRAMING USING JAVASCRIPT

DOM Primer Part 2. Contents

JSF - H:INPUTSECRET. Class name of a validator that s created and attached to a component

710 Index Attributes, 127 action attribute, 263 assigning, bottom attribute, domain name attribute, 481 expiration date attribute, 480 8

INDEX SYMBOLS See also

CSC Web Programming. JavaScript Browser Objects

SERVLETS INTERVIEW QUESTIONS

Servlet Fudamentals. Celsina Bignoli

Outline. Lecture 4: Document Object Model (DOM) What is DOM Traversal and Modification Events and Event Handling

LECTURE-2. Functions review HTML Forms. Arrays Exceptions Events. CS3101: Scripting Languages: Javascript Ramana Isukapalli

CSC Javascript

Princeton University COS 333: Advanced Programming Techniques A Subset of JavaScript

********************************************************************

Introduction to Java Servlets. SWE 432 Design and Implementation of Software for the Web

Princeton University COS 333: Advanced Programming Techniques A Subset of JavaScript

HTML User Interface Controls. Interactive HTML user interfaces. Document Object Model (DOM)

Introduction to DHTML

Continues the Technical Activities Originated in the WAP Forum

CISH-6510 Web Application Design and Development. Overview of JavaScript. Overview

CITS3403 Agile Web Development Semester 1, 2018

JSF - H:SELECTONEMENU

Want to add cool effects like rollovers and pop-up windows?

Installation and Configuration Manual

COMP519 Web Programming Lecture 16: JavaScript (Part 7) Handouts

UNIT 1: JAVA PROGRAMMING PART A. 1. What is meant by Object Oriented Programming?

CSI 3140 WWW Structures, Techniques and Standards. Browsers and the DOM

JSF - H:SELECTONERADIO

Photo from DOM

Using JavaScript for Client-Side Behavior

Beijing , China. Keywords: Web system, XSS vulnerability, Filtering mechanisms, Vulnerability scanning.

Webpage Navigation. Lecture 27. Robb T. Koether. Hampden-Sydney College. Mon, Apr 2, 2018

Enterprise Java Unit 1- Chapter 4 Prof. Sujata Rizal Servlet API and Lifecycle

CSC309: Introduction to Web Programming. Lecture 8

Chapter 10 Servlets and Java Server Pages

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

IT6503 WEB PROGRAMMING. Unit-I

Distributed Systems 1

link document.getelementbyid("coffee").style.borderwidth = "0px" document.getelementbyid("tea").style.borderwidth = "10px"

Advanced Internet Technology Lab # 4 Servlets

Automated Article Links Identification for Web-based Online Medical Journals

TEXTAREA NN 2 IE 3 DOM 1

Java Servlets. Preparing your System

XHTML Mobile Profile. Candidate Version Feb Open Mobile Alliance OMA-TS-XHTMLMP-V1_ C

CERTIFICATE IN WEB PROGRAMMING

3. Mention the features of Java. (NOV/DEC 2013, NOV/DEC 2015) There are many features of java. They are also known as java buzzwords.

AIM. 10 September

Alpha College of Engineering and Technology. Question Bank

JavaServer Faces Technology, AJAX, and Portlets: It s Easy if You Know How!

Programming the Web VALIDATING FORM INPUT

Name Related Elements Type Default Depr. DTD Comment

TUTORIAL QUESTION BANK

This tutorial will teach you how to use Java Servlets to develop your web based applications in simple and easy steps.

Canvas & Brush Reference. Source: stock.xchng, Maarten Uilenbroek

SSC - Web applications and development Introduction and Java Servlet (I)

The Basic Web Server CGI. CGI: Illustration. Web based Applications, Tomcat and Servlets - Lab 3 - CMPUT 391 Database Management Systems 4

JavaScript is described in detail in many books on the subject, and there is excellent tutorial material at

Javascript. A key was pressed OR released. A key was released. A mouse button was pressed.

UNIT I. A protocol is a precise set of rules defining how components communicate, the format of addresses, how data is split into packets

University of Toronto School of Continuing Studies. A Conceptual Overview of E-Business Technologies

LAB 1 PREPARED BY : DR. AJUNE WANIS ISMAIL FACULTY OF COMPUTING UNIVERSITI TEKNOLOGI MALAYSIA

JAVASCRIPT FOR PROGRAMMERS

CSS The web browser uses its own resources, and eases the burden on the server. It has fewer features than server side scripting.

Java.. servlets and. murach's TRAINING & REFERENCE 2ND EDITION. Joel Murach Andrea Steelman. IlB MIKE MURACH & ASSOCIATES, INC.

COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2018)

Uniform Resource Locators (URL)

Module 3 Web Component

Varargs Training & Software Development Centre Private Limited, Module: HTML5, CSS3 & JavaScript

Web Software Model CS 4640 Programming Languages for Web Applications

FORM VALIDATION. June 2016 IJIRT Volume 3 Issue 1 ISSN: Himanshu Kapoor Dronacharya College Of Engineering, Khentawas, Gurgaon

1Z Java EE 6 Web Component Developer Certified Expert Exam Summary Syllabus Questions

Application Design and Development: October 30

Web Programming and Design. MPT Junior Cycle Tutor: Tamara Demonstrators: Aaron, Marion, Hugh

Index LICENSED PRODUCT NOT FOR RESALE

Java SE7 Fundamentals

Advance Java. Configuring and Getting Servlet Init Parameters per servlet

JSF - H:PANELGRID. JSF Tag. Rendered Output. Tag Attributes. The h:panel tag renders an HTML "table" element. Attribute & Description.

Index. Ray Nicholus 2016 R. Nicholus, Beyond jquery, DOI /

HTML 5 Tables and Forms

INTRODUCTION TO SERVLETS AND WEB CONTAINERS. Actions in Accord with All the Laws of Nature

Introduction to JavaScript p. 1 JavaScript Myths p. 2 Versions of JavaScript p. 2 Client-Side JavaScript p. 3 JavaScript in Other Contexts p.

Web Design. Lecture 6. Instructor : Cristina Mîndruță Site : Cristina Mindruta - Web Design

Chapter 11 Objectives

CNIT 129S: Securing Web Applications. Ch 3: Web Application Technologies

UI Course HTML: (Html, CSS, JavaScript, JQuery, Bootstrap, AngularJS) Introduction. The World Wide Web (WWW) and history of HTML

Contents (Subject to Change)

13. Databases on the Web

5-Sep-16 Copyright 2016 by GemTalk Systems LLC 1

KINGS COLLEGE OF ENGINEERING 1

JavaScript Introduction

WebSphere Application Server V7: Session Management

Transcription:

UNIT - III Host Objects: Browsers and the DOM-Introduction to the Document Object Model DOM History and Levels-Intrinsic Event Handling- Modifying Element Style-The Document Tree-DOM Event Handling- Accommodating Noncompliant Browsers Properties of window-case Study. Server- Side Programming: Java Servlets- Architecture -Overview-A Servlet- Generating Dynamiccontent-Life Cycle-Parameter Data-Sessions- Cookies-URL Rewriting-Other Capabilities-Data Storage Servlets and Concurrency-Case Study-Related Technologies. 1. What is DOM? DOM (Document Object Model) is an API that defines how JavaScript programs can access and manipulate the HTML document currently displayed by a browser. It includes the definition of the properties of document object, many of which are themselves objects with their own properties. 2. List out some of the HTML intrinsic event attributes. (APRIL/MAY 2011) onload, onclick, ondblclick, onmousedown, onmouseup, onmousemove, onfocus, onblur, onkeypress, onkeydown, onselect, onchange, onsubmit, onreset etc. 3. What is Node object? Every element in a document tree refers to a Node object. Some nodes of the tree are JavaScript objects corresponding to HTML elements such html or body. 4. List out the properties of a Node object. Properties of a Node object are nodetype nodename

parentnode childnodes previoussibling nextsibling attributes 5. What do you mean by document node? The document object itself is considered to be DOM tree node with node type 9 and symbolic constant DOCUMENT_NODE and it has its own properties and methods 6. List out some possible values for the nodetype property of Node instances. Value Symbolic Constant Host Object Type 1 Node.ELEMENT_NODE Element 2 Node.ATTRIBUTE_NODE Attr 3 Node.TEXT_NODE Text 8 Node.COMMENT_NODE Comment 9 Node.DOCUMENT_NODE Document 10 Node.DOCUMENT_TYPE_NODE DocumentType 7. List out some properties of the document object. The properties of document object are DOCTYPE, TITLE, BODY, COOKIE, URL, DOMAIN, REFERRER, CREATEELEMENT(STRING), CREATETEXTNODE(STRING), GETELEMENTBYID(STRING), GETELEMENTBYTAGNAME(STRING) 8. Explain Event object. In the DOM event model, when an event occurs, an instance of a host object named Event is created. This instance contains information about

the event, including the type of event and a reference to the document node corresponding to the markup element that generated the event which is called the event target. The Event instance properties type and target provides this information. 9. What is the important feature of dynamic positioning? (APRIL/MAY 2008) Dynamic positioning allows you to tell the browser exactly where to put a block of content without using tables. 10. List the possible opacity attributes of dynamic positioning. (APRIL/MAY 2008) HTML:The basic building block. Document Object Model: The objects that make up the contents of any Web page. JavaScript: A scripting language that can manipulate the objects. Positioning: The placement of objects within the document. 11. What is Event Listener? An Event Listener is simply a function that takes a single argument that is an instance of an Event. A call to the addeventlistener() method on a node object associates an event listener with a type of event occurring on that node. 12. What are the types of Events? i. HTML intrinsic events ii. HTML Events iii. UI Events iv. Mutation Events 13. What do you mean by bubbling listener?

Bubbling listener is a listener associated with an ancestor of the target node and that was created with a call to addeventlistener() and had its third argument set to false e.g. ancestor.addeventlistener( click,listener3,false); 14. List out some common window object methods. alert(string), confirm(string), prompt(string, String), open(string, String) close(), focus(), blur(), print() 15. List out some common window object methods related to time. i) settimeout(string, Number) ii) cleartimeout(number) iii) setinterval(string, Number) iv) clearinterval(number) 16. What is DHTML? The combination of HTML plus JavaScript and the DOM is referred to as Dynamic HTML (DHTML), and an HTML document that contains scripting is called a dynamic document. 17. Define servlet. A servlet is a java class that a web server instantiates when the server is started. A particular method is called in this instance when the server receives certain HTTP requests. 18. What are servlet life cycle methods? The methods of servlet life cycle are INIT(), SERVICE() AND DESTROY()

19. What are servlet listener classes? Listener classes is used to initialize a web application consisting of multiple servlets rather than a single servlet and can be created and registered with the server so that they will be called when certain event occurs, including life-cycle events. 20. What are the functions of doget() and dopost() methods? doget()-browser will append the query string it constructs to the form s action URL and performs an HTTP GET using the resulting URL. DOPOST() Same query string will be constructed, but it will be passed to the server via the body of the HTTP request rather than as part of the URL. 21. Define Session. Collection of HTTP requests, all associated with a single session ID, is known as a session. Sessions are maintained by communication between clients and servers. 22. How the session is terminated? By default the time interval for a session is 20 minutes. The session can also be forced to terminate by calling invalidate() method. The time interval for the session can be set using setmaxinactiveinterval() method. 23. Explain cookies. (APRIL/MAY 2008), (APRIL/MAY 2010) Cookies are some little information that can be left on your computer by the other computer when we access an internet. 24. Define cookie.

A cookie is a name-value pair that a web server sends to a client machine as part of an HTTP response, specifically through the Set-cookie header field. 25. Explain the difference between get request and post request type. The HTML specifications technically define the difference between "GET" and "POST" so that former means that form data is to be encoded (by a browser) into a URL while the latter means that the form data is to appear within a message body. 26. List out the methods of Cookie class. Cookie, getname(), getvalue(), setmaxage() 27. Define Thread. A thread is the Java VM s abstract representation of the processing to be performed to accomplish a particular task, possibly concurrently with other tasks. 28. Write the code to return the full URL of a document. (NOV/DEC2011) <html> <head> <title>javascript get url</title> </head> <body> <script> document.write(document.location.href) </script>

</body> </html> 29. How is session tracking achieved by URL rewriting? (NOV/DEC2011) In URL rewriting the server passes a session ID by adding it to every servlet URL appearing in any page sent to the client. It involves rewriting every URL referencing the servlet in the href attribute of any anchor and the action attribute of any form output by the servlet 30. Expand the following : i) HTTP, ii) JDBC iii) URL iv) SQL HTTP Hyper Text Transfer Protocol JDBC- Java Data Base Connectivity URL Uniform Resource Locator SQL- Structured Query Language 31. List out the methods of HTTP. doget() dopost() dooptions() doput() dotrace() dodelete() dohead()