Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Java Scripting and XML-Information Technology-Lecture Handout, Exercises of Information Technology

Main tpoics for the course are mentioned here. What is E-Commerce and its type. Networking Devices. Markup languages. Security issues. Data mining. E-business. Cryptography and public key infrastructure. Electronic Data Exchange. Internet marketing. ERP. This lecture includes: Java, Scripting, Xml, Registration, Display, Loop, Initialization, Statement, Execution, Information, Extensible, Markup, Language

Typology: Exercises

2011/2012

Uploaded on 08/11/2012

duraid
duraid 🇮🇳

4.3

(3)

55 documents

1 / 5

Toggle sidebar

Related documents


Partial preview of the text

Download Java Scripting and XML-Information Technology-Lecture Handout and more Exercises Information Technology in PDF only on Docsity! E-COMMERCE – IT430 VU © Copyright Virtual University of Pakistan 74 Lesson 16 JAVA SCRIPTING AND XML For loop can be used in the code of Registration form to check that users do not type invalid characters in the text box. For example, in case a user types a “,” in the text box for user login, an alert box can be made to display informing him that it is an invalid user login. See Fig. 1 below. Fig. 1 Look at the code to understand For statement/ loop. The initialization statement is executed only at the beginning of the For loop’s execution. The condition is then tested, and if it is true the statements enclosed within the curly brackets are executed. If the condition is false, the loop is terminated and the statement following the For statement is executed. Another check can also be applied to see that the passwords entered in two different text boxes by the user are the same. In case the two passwords do not match an alert box can inform the user about it (see Fig. 2 below). In case no condition applied in the code is violated then the function checkValues returns true at ‘onsubmit’. Consequently, the information provided by the user in the form is forwarded to the server side. Fig. 2 Extensible markup language World Wide Web Consortium (W3C), a non-profit organization that maintains standards for the web presented the draft of XML in late 1990’s. It is also used for web page creation and includes data management capabilities that HTML cannot provide. Consider the example of a list of planets. Suppose that same HTML heading tags are decided to be used each planet. Also, suppose that it is decided to display different pieces of information about a planet in different heading sizes. Then, there is a shortcoming in respect of HTML that it can only supply upto 6 different levels of headings. In case there are more than six docsity.com E-COMMERCE – IT430 VU © Copyright Virtual University of Pakistan 75 different pieces of information to display, then HTML loses its efficacy. That is why web professionals have found XML as a list formatting alternative of HTML. Following is a simple HTML code for preparing the list of planets: <HTML> <HEAD><TITLE>Planets</TITLE> </HEAD> <BODY> <h1>Planets</h1> <h2>PlanetName</h2> <h3>DistanceFromSun</h3> <h4>Moons</h4> <h5>DayLength</h5> <h2>Mercury</h2> <h3>36 million miles</h3> <h4>None</h4> <h5>176 Days</h5> <h2>Venus</h2> <h3>67 million miles</h3> <h4>None</h4> <h5>117 days</h5> <h2>Earth</h2> <h3>93 million miles</h3> <h4>One</h4> <h5>24 Hours</h5> </BODY> </HTML> Result is shown in Fig. 3 below. Fig. 3 XML differs from HTML in two important respects. Firstly, XML is not a markup language with defined tags; rather, one can create one’s own set of tags in XML. Secondly, XML tags do not provide information how text would appear on a web page. Instead of that XML tags convey meaning of information included docsity.com
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved