PIC 40A. Review for the Final. Copyright 2011 Jukka Virtanen UCLA 1 06/05/15

Size: px
Start display at page:

Download "PIC 40A. Review for the Final. Copyright 2011 Jukka Virtanen UCLA 1 06/05/15"

Transcription

1 PIC 40A Review for the Final 06/05/15 Copyright 2011 Jukka Virtanen UCLA 1

2 Overview Final is on: Monday, June 08, :30 AM - 2:30 PM Geology 4645 Double check on myucla.edu. 06/05/15 Copyright Jukka Virtanen

3 Overview Short answer XHTML CSS JavaScript PHP PHP MySQL XML/DTD Most likely 6 or 7 questions. 06/05/15 Copyright Jukka Virtanen

4 PHP MySQL You should know: How to write a form. What happens when submit button is pressed. How you use PHP to capture the data from the form. How to process the data. How to open a connection to a MySQL database. How to write data into a database. How to retrieve information from a database. How to use the data to create a new web page. 06/05/15 Copyright Jukka Virtanen

5 Using PHP to create webpages I will most likely ask you to create a table or a list or something else from some data that can come from the user or from a MySQL database or something like that. You should know how to use various PHP techniques to write XHTML or even JavaScript. 06/05/15 Copyright Jukka Virtanen

6 Example Consider the following XHTML form: <p> In the form below please write what kind of animals your pets are and their names. Then click submit.</p> <form action=" method="get"> <p> Animal <input type="text" name="animal1"/> Name <input type="text" name="name1"/><br/> Animal <input type="text" name="animal2"/> Name <input type="text" name="name2"/><br/> <input type="submit" value="submit"/> </p> </form> When the user clicks submit, a PHP program process_form.php is called. process_form takes the information supplied by the user and writes it into a table form. For example filling the form as below: 06/05/15 Copyright Jukka Virtanen

7 Example Should result in the following XHTML page being sent to the user: Write the PHP code snippet to process the form data and to create the XHTML table. You need not have the PHP write any other XHTML than what is required for the table. 06/05/15 Copyright Jukka Virtanen

8 Solution <?php $animal1 = $_GET['animal1']; $animal2 = $_GET['animal2']; $name1 = $_GET['name1']; $name2 = $_GET['name2']; print "<table>"; print "<tr><td>$animal1</td><td>$name1</td></tr>"; print "<tr><td>$animal2</td><td>$name2</td></tr>"; print "</table>";?> 06/05/15 Copyright Jukka Virtanen

9 PHP and timestamps Timestamp is just a number of seconds elapsed since Jan up to some given time. We can extract lot of information from a time stamp using the predefined function date. mktime(... ) allows us to create a timestamp if we give as arguments hr,min,sec,mo,day, year. time() will give us the current timestamp. You should review: Midterm 2 question 4, Homeworks 5,6. 06/05/15 Copyright Jukka Virtanen

10 PHP Arrays PHP arrays are indexed by keys. The important concepts are: Declaring arrays Accessing array elements using keys sizeof explode/implode next,current foreach sorting arrays This is not an all inclusive list but these are concepts I expect you to know without wasting time at looking at notes. 06/05/15 Copyright Jukka Virtanen

11 Example Assume that you have a PHP array called $days. The $days array contains strings that represent dates with the following format: MM-DD-YYYY. For example: The array $days might look something like: $days = array(" "," "," "); Your boss wants you to write code that outputs this array keeping the same month and day but fixing the year to be the current year. Warning: This array is indexed by keys. a) Write the code to get the current Unix timestamp then use this timestamp with the date function to get the current year. (Hint: Y is used to get the year.) b) Assume that the current year is now in a variable called $year. Use this variable along with the $days array to output the array with the old days and updated years. 06/05/15 Copyright Jukka Virtanen

12 Solution a) $year = date("y"); b) <?php $ar = array("key1"=>" ", "key2"=>" ", "key3"=>" ", "key4"=>" "); foreach ($ar as $k =>$v) { $date_array = explode("-",$v); $date_array[2] = $year; $d = implode("-",$date_array); echo "$d<br/>"; }?> 06/05/15 Copyright Jukka Virtanen

13 PHP Regular expressions You are expected to know basic regular expression concepts. Since regular expression patterns are same in JS as they are in PHP I might switch things up a bit and ask you to apply regular expressions in JS. I will of course have to tell you what the relevant functions are. 06/05/15 Copyright Jukka Virtanen

14 Example We have a PHP array called $student_info. Each entry in this array is a string describing a single students information. You do not know exactly in what format this string is however you do know that it contains the students address. Extract from each entry an address: bruinonlineid.ucla.edu and write it to an array called s. 06/05/15 Copyright Jukka Virtanen

15 Example <?php $ar = array("key1" => "hmhmhmhhm jukka@ucla.edu", "key2"=>"fsdkjdkf dkfjdkfj j56hello@ucla.edu", "key3"=>"m78@ucla.edu jhjoo4fj@ucla.edu", "key4"=>"moo@ucla.edu"); $pattern = "/[a-z][a-z0-9]{2,14}@ucla\.edu/"; foreach ($ar as $k =>$v) { preg_match_all($pattern, $v, $ _ar); $ = $ _ar[0][0]; echo $ ."<br/>"; }?> 06/05/15 Copyright Jukka Virtanen

16 JavaScript There are 4 main topics: "Ordinary" JavaScript stuff -basics, functions, control structures, random numbers etc. DOM manipulations Cookies Events 06/05/15 Copyright Jukka Virtanen

17 DOM Example a) Write a function that prompts the user to enter a string and then appends the string to an unordered list. You may assume that the page already contains a single element <ul></ul> and you need only to append <li> tags (with approprate content) to this element. 06/05/15 Copyright Jukka Virtanen

18 DOM Example function create_list() { var str = prompt("type some text"); ul_node = document.getelementsbytagname("ul")[0]; var li_object = document.createelement("li"); text_object = document.createtextnode(str); li_object.appendchild(text_object); ul_node.appendchild(li_object); } 06/05/15 Copyright Jukka Virtanen

19 DOM Example b) Write a JS function called next(). This function "cycles" through the words in your unordered list from part a). When the function next() is called, the next word in the unordered list is selected by underlining the text in it and the previously selected word is no longer underlined. When the last word is currently selected and next() is called, the first word on the list should be selected. You may assume that there is a global variable called current defined for you. This variable is the object node of the currently selected word. However, when you use the variable current it is up to you to update this variable. Hints: current.nextsibling is the node object of the next list item. current.nextsibling is false if there is no next sibling. You can always get the first list item by referring to the firstchild of the ul node. 06/05/15 Copyright Jukka Virtanen

20 DOM Example current = ul_node.firstchild; current.style.textdecoration="underline"; } function next() { ul_node = document.getelementsbytagname("ul")[0]; current.style.textdecoration = "none"; if (current.nextsibling) current = current.nextsibling; else current = ul_node.firstchild; current.style.textdecoration="underline"; } 06/05/15 Copyright Jukka Virtanen

21 Cookies It is likely that there will be some question about cookies because it is a good way for me to test you on JS arrays and functions. Main facts about cookies: To update a cookie write: document.cookie="cookie_name=new_value"; This will overwrite the cookie_name's old value cookie with a new_value. To append a new cookie to the cookies document.cookie="new_cookie_name=cookie_value"; Aside from these two things document.cookie is nothing more than a string! 06/05/15 Copyright Jukka Virtanen

22 Cookie example Assume that the web page you are working on has multiple cookies. One of these cookies is a cookie called visitors. Write a function called append_visitor that takes as an argument a string called name and then appends the name to the visitors cookie. The visitors cookie has the form: visitors=joe^joanna^joe^cub; 06/05/15 Copyright Jukka Virtanen

23 Solution function append_visitor(name) { var cookies_ar = document.cookie.split("; "); for (var i=0; i < cookies_ar.length(); i++) { var cookie = cookies_ar[i].split("="); if (cookie[0] == "visitors") var cookie_value = cookie[1] + "^" + name; } document.cookie = "visitors=" + cookie_value; } 06/05/15 Copyright Jukka Virtanen

24 Events Browser detects when an event occurs and if an event handler has been registered then a function is called. Our favorite event has been the onclick event. You should also know onhover and onload events. If I tell you another event you should understand how to write the appropriate code. Event can be either "hard coded" into the XHTML such as onclick usually is. Event can also be registered dynamically. 06/05/15 Copyright Jukka Virtanen

25 Registration Example 1 Assign a tag attribute: <head> <title>event Handler Example</title> <script type="text/javascript"> <!-- function load_greeting() { alert("whatup!");} // --> </script> </head> <body onload="load_greeting()"> </body> 06/05/15 Copyright Jukka Virtanen

26 Registration Example 2 In a head JavaScript script <script type="text/javascript"> <!-- function message() {alert("thanks for clicking");} // --> </script> In the body <form id="messageboard" action=""> <input type="button" name="mybutton" id="mybutton" value= See a message" /> </form> <script type="text/javascript"> <!-- document.getelementbyid("mybutton").onclick = message; // --> </script> 06/05/15 Copyright Jukka Virtanen

27 XML/DTD You are exprected to know: What XML is and is not. Why is XML useful. What is an XML application. What is and XML document. What is well-formed XML. What is valid XML. What is a DTD. How do you write a DTD. What are the content models. 06/05/15 Copyright Jukka Virtanen

28 Example a) You will create a DTD from scratch. Write the correct DTD declaration for each of the following descriptions. (Your answers should NOT be XML elements!) Declare an element e which has string content: Declare an element d which cannot have any content: Declare an element c which contains precisely one e followed by possibly one d: Declare an element b which has mixed content, namely strings mixed with any number of e elements. Declare an element a whose content will be a choice between a sequence of (one or more c, then one d, then 0 or more e, then one b) and a sequence of (one b, then one d, then one c): 06/05/15 Copyright Jukka Virtanen

29 Solution Declare an element e which has string content <!ELEMENT e (#PCDATA)> Declare an element d which cannot have any content: <!ELEMENT d EMPTY> Declare an element c which contains precisely one e followed by possibly one d: <!ELEMENT c (e,d?)> Declare an element b which has mixed content, namely strings mixed with any number of e elements. <!ELEMENT b (#PCDATA e)*> Declare an element a whose content will be a choice between a sequence of (one or more c, then one d, then 0 or more e,then one b) and a sequence of (one b, then two or more d, then one c): <!ELEMENT a ( (c+, d, e*, b) (b, d, d+, c) )> 06/05/15 Copyright Jukka Virtanen

30 Example b) Create a well-formed and valid XML document that uses the DTD above and has root element a. (Only write the XML. You need not write DOCTYPE declaration.) <a> </a> <c> <e>text</e> //here you could have one <d/> </c> <d/> // Here one could have <e> text</e> <b> //Here you could have any number of <e>text</e> mixed with text </b> Or another possibility is <a> <b> //Here you could have any number of <e>text</e> mixed with text </b> <d/> <d/> // could have more <d/>s </a> <c> </c> <e>text</e> //here you could have one <d/> 06/05/15 Copyright Jukka Virtanen

31 T/F fun An XHTML document is an example of a XML application. <Phone_Number> </Phone_Number> is not correct XML because all XML tags should be lower case. Valid XML documents are automatically also well-formed XML documents. Consider the following PHP fragment: $my_ar[0] = 0; $my_ar[1] = 1; while ($elt = next($my_ar)) {print "Hello!";} The output of the above code is: Hello!Hello! The JavaScript line: document.cookie = "New_Cookie = new_val"; overwrites any previous cookies a website may have. 06/05/15 Copyright Jukka Virtanen

32 T/F fun In JavaScript, primitive types are often coerced to their wrapper objects. The output of the following PHP lines is Hello! if (mktime (5,20,4,12,14,2012) >= mktime (4,0,4,12,15,2012)) print "Hello!"; Browser wars led to the intertwining of structure layers and style layers. Tim Berners-Lee was the first one to use the term internet. The style rule: div p {color:red;} will be applied to the element <p> in the code below: <div> <ul> <li><p>hello!</p></li> </ul> </div> 06/05/15 Copyright Jukka Virtanen

PIC 40A. Midterm 2 Review

PIC 40A. Midterm 2 Review PIC 40A Midterm 2 Review What to expect? Topics that you can expect questions from: JavaScript JavaScript DOM JavaScript dynamic style JavaScript Animation JavaScript cookies JavaScript event handling

More information

PIC 40A. Lecture 4b: New elements in HTML5. Copyright 2011 Jukka Virtanen UCLA 1 04/09/14

PIC 40A. Lecture 4b: New elements in HTML5. Copyright 2011 Jukka Virtanen UCLA 1 04/09/14 PIC 40A Lecture 4b: New elements in HTML5 04/09/14 Copyright 2011 Jukka Virtanen UCLA 1 Sectioning elements HTML 5 introduces a lot of sectioning elements. Meant to give more meaning to your pages. People

More information

PIC 40A. Lecture 19: PHP Form handling, session variables and regular expressions. Copyright 2011 Jukka Virtanen UCLA 1 05/25/12

PIC 40A. Lecture 19: PHP Form handling, session variables and regular expressions. Copyright 2011 Jukka Virtanen UCLA 1 05/25/12 PIC 40A Lecture 19: PHP Form handling, session variables and regular expressions 05/25/12 Copyright 2011 Jukka Virtanen UCLA 1 How does a browser communicate with a program on a server? By submitting an

More information

Web Site Development with HTML/JavaScrip

Web Site Development with HTML/JavaScrip Hands-On Web Site Development with HTML/JavaScrip Course Description This Hands-On Web programming course provides a thorough introduction to implementing a full-featured Web site on the Internet or corporate

More information

PIC 40A. Lecture 10: JS: Wrapper objects, Input and Output, Control structures, random numbers. Copyright 2011 Jukka Virtanen UCLA 1 04/24/17

PIC 40A. Lecture 10: JS: Wrapper objects, Input and Output, Control structures, random numbers. Copyright 2011 Jukka Virtanen UCLA 1 04/24/17 PIC 40A Lecture 10: JS: Wrapper objects, Input and Output, Control structures, random numbers 04/24/17 Copyright 2011 Jukka Virtanen UCLA 1 Objects in JS In C++ we have classes, in JS we have OBJECTS.

More information

Q1. What is JavaScript?

Q1. What is JavaScript? Q1. What is JavaScript? JavaScript was designed to add interactivity to HTML pages JavaScript is a scripting language A scripting language is a lightweight programming language JavaScript is usually embedded

More information

COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2018)

COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2018) COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2018) RAMANA ISUKAPALLI RAMANA@CS.COLUMBIA.EDU 1 LECTURE-1 Course overview See http://www.cs.columbia.edu/~ramana Overview of HTML Formatting, headings,

More information

PIC 40A. Midterm 1 Review

PIC 40A. Midterm 1 Review PIC 40A Midterm 1 Review XHTML and HTML5 Know the structure of an XHTML/HTML5 document (head, body) and what goes in each section. Understand meta tags and be able to give an example of a meta tags. Know

More information

COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2017)

COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2017) COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2017) RAMANA ISUKAPALLI RAMANA@CS.COLUMBIA.EDU 1 LECTURE-1 Course overview See http://www.cs.columbia.edu/~ramana Overview of HTML Formatting, headings,

More information

<form>. input elements. </form>

<form>. input elements. </form> CS 183 4/8/2010 A form is an area that can contain form elements. Form elements are elements that allow the user to enter information (like text fields, text area fields, drop-down menus, radio buttons,

More information

COM1004 Web and Internet Technology

COM1004 Web and Internet Technology COM1004 Web and Internet Technology When a user submits a web form, how do we save the information to a database? How do we retrieve that data later? ID NAME EMAIL MESSAGE TIMESTAMP 1 Mike mike@dcs Hi

More information

JavaScript CSCI 201 Principles of Software Development

JavaScript CSCI 201 Principles of Software Development JavaScript CSCI 201 Principles of Software Development Jeffrey Miller, Ph.D. jeffrey.miller@usc.edu Outline JavaScript Program USC CSCI 201L JavaScript JavaScript is a front-end interpreted language that

More information

Web Programming/Scripting: JavaScript

Web Programming/Scripting: JavaScript CS 312 Internet Concepts Web Programming/Scripting: JavaScript Dr. Michele Weigle Department of Computer Science Old Dominion University mweigle@cs.odu.edu http://www.cs.odu.edu/~mweigle/cs312-f11/ 1 Outline!

More information

Manual Html A Href Onclick Submit Form

Manual Html A Href Onclick Submit Form Manual Html A Href Onclick Submit Form JS HTML DOM. DOM Intro DOM Methods HTML form validation can be done by a JavaScript. If a form field _input type="submit" value="submit" /form_. As shown in a previous

More information

Lecture 7: Dates/Times & Sessions. CS 383 Web Development II Wednesday, February 14, 2018

Lecture 7: Dates/Times & Sessions. CS 383 Web Development II Wednesday, February 14, 2018 Lecture 7: Dates/Times & Sessions CS 383 Web Development II Wednesday, February 14, 2018 Date/Time When working in PHP, date is primarily tracked as a UNIX timestamp, the number of seconds that have elapsed

More information

Shankersinh Vaghela Bapu Institue of Technology

Shankersinh Vaghela Bapu Institue of Technology Branch: - 6th Sem IT Year/Sem : - 3rd /2014 Subject & Subject Code : Faculty Name : - Nitin Padariya Pre Upload Date: 31/12/2013 Submission Date: 9/1/2014 [1] Explain the need of web server and web browser

More information

Place User-Defined Functions in the HEAD Section

Place User-Defined Functions in the HEAD Section JavaScript Functions Notes (Modified from: w3schools.com) A function is a block of code that will be executed when "someone" calls it. In JavaScript, we can define our own functions, called user-defined

More information

CHAPTER 1: GETTING STARTED WITH HTML CREATED BY L. ASMA RIKLI (ADAPTED FROM HTML, CSS, AND DYNAMIC HTML BY CAREY)

CHAPTER 1: GETTING STARTED WITH HTML CREATED BY L. ASMA RIKLI (ADAPTED FROM HTML, CSS, AND DYNAMIC HTML BY CAREY) CHAPTER 1: GETTING STARTED WITH HTML EXPLORING THE HISTORY OF THE WORLD WIDE WEB Network: a structure that allows devices known as nodes or hosts to be linked together to share information and services.

More information

CIW 1D CIW JavaScript Specialist.

CIW 1D CIW JavaScript Specialist. CIW 1D0-635 CIW JavaScript Specialist http://killexams.com/exam-detail/1d0-635 Answer: A QUESTION: 51 Jane has created a file with commonly used JavaScript functions and saved it as "allfunctions.js" in

More information

JavaScript s role on the Web

JavaScript s role on the Web Chris Panayiotou JavaScript s role on the Web JavaScript Programming Language Developed by Netscape for use in Navigator Web Browsers Purpose make web pages (documents) more dynamic and interactive Change

More information

Lecture : 3. Practical : 2. Course Credit. Tutorial : 0. Total : 5. Course Learning Outcomes

Lecture : 3. Practical : 2. Course Credit. Tutorial : 0. Total : 5. Course Learning Outcomes Course Title Course Code WEB DESIGNING TECHNOLOGIES DCE311 Lecture : 3 Course Credit Practical : Tutorial : 0 Total : 5 Course Learning Outcomes At end of the course, students will be able to: Understand

More information

Notes General. IS 651: Distributed Systems 1

Notes General. IS 651: Distributed Systems 1 Notes General Discussion 1 and homework 1 are now graded. Grading is final one week after the deadline. Contract me before that if you find problem and want regrading. Minor syllabus change Moved chapter

More information

JavaScript. Like PHP, JavaScript is a modern programming language that is derived from the syntax at C.

JavaScript. Like PHP, JavaScript is a modern programming language that is derived from the syntax at C. Like PHP, JavaScript is a modern programming language that is derived from the syntax at C. It has been around just about as long as PHP, also having been invented in 1995. JavaScript, HTML, and CSS make

More information

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad - 500 043 INFORMATION TECHNOLOGY TUTORIAL QUESTION BANK Course Name Course Code Class Branch : Web Technologies : ACS006 : B. Tech

More information

Chapter4: HTML Table and Script page, HTML5 new forms. Asst. Prof. Dr. Supakit Nootyaskool Information Technology, KMITL

Chapter4: HTML Table and Script page, HTML5 new forms. Asst. Prof. Dr. Supakit Nootyaskool Information Technology, KMITL Chapter4: HTML Table and Script page, HTML5 new forms Asst. Prof. Dr. Supakit Nootyaskool Information Technology, KMITL Objective To know HTML5 creating a new style form. To understand HTML table benefits

More information

TUTORIAL QUESTION BANK

TUTORIAL QUESTION BANK + INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad - 500 043 COMPUTER SCIENCE AND ENGINEERING TUTORIAL QUESTION BANK Course Name Course Code Class Branch : Web Technologies : ACS006

More information

VTU Question Bank. UNIT 1 Introduction to WWW, XHTML

VTU Question Bank. UNIT 1 Introduction to WWW, XHTML VTU Question Bank UNIT 1 Introduction to WWW, XHTML 1. Explain HTTP. (05 Marks) (Jan-2014, Dec-2012, Jun/July -2011, June-2012) 2. Explain Web servers operation and general server characteristics. (05

More information

AIM. 10 September

AIM. 10 September AIM These two courses are aimed at introducing you to the World of Web Programming. These courses does NOT make you Master all the skills of a Web Programmer. You must learn and work MORE in this area

More information

CS7026. Introduction to jquery

CS7026. Introduction to jquery CS7026 Introduction to jquery What is jquery? jquery is a cross-browser JavaScript Library. A JavaScript library is a library of pre-written JavaScript which allows for easier development of JavaScript-based

More information

Alpha College of Engineering and Technology. Question Bank

Alpha College of Engineering and Technology. Question Bank Alpha College of Engineering and Technology Department of Information Technology and Computer Engineering Chapter 1 WEB Technology (2160708) Question Bank 1. Give the full name of the following acronyms.

More information

Web development using PHP & MySQL with HTML5, CSS, JavaScript

Web development using PHP & MySQL with HTML5, CSS, JavaScript Web development using PHP & MySQL with HTML5, CSS, JavaScript Static Webpage Development Introduction to web Browser Website Webpage Content of webpage Static vs dynamic webpage Technologies to create

More information

When a web server has sent a web page to a browser, the connection is shut down, and the server forgets everything about the user.

When a web server has sent a web page to a browser, the connection is shut down, and the server forgets everything about the user. JavaScript Cookies PreviousNext Cookies let you store user information in web pages. What are Cookies? Cookies are data, stored in small text files, on your computer. When a web server has sent a web page

More information

Part A Short Answer (50 marks)

Part A Short Answer (50 marks) Part A Short Answer (50 marks) NOTE: Answers for Part A should be no more than 3-4 sentences long. 1. (5 marks) What is the purpose of HTML? What is the purpose of a DTD? How do HTML and DTDs relate to

More information

Get in Touch Module 1 - Core PHP XHTML

Get in Touch Module 1 - Core PHP XHTML PHP/MYSQL (Basic + Advanced) Web Technologies Module 1 - Core PHP XHTML What is HTML? Use of HTML. Difference between HTML, XHTML and DHTML. Basic HTML tags. Creating Forms with HTML. Understanding Web

More information

Client vs Server Scripting

Client vs Server Scripting Client vs Server Scripting PHP is a server side scripting method. Why might server side scripting not be a good idea? What is a solution? We could try having the user download scripts that run on their

More information

Student, Perfect Midterm Exam March 24, 2006 Exam ID: 3193 CS-081/Vickery Page 1 of 5

Student, Perfect Midterm Exam March 24, 2006 Exam ID: 3193 CS-081/Vickery Page 1 of 5 Student, Perfect Midterm Exam March 24, 2006 Exam ID: 3193 CS-081/Vickery Page 1 of 5 NOTE: It is my policy to give a failing grade in the course to any student who either gives or receives aid on any

More information

Controlled Assessment Task. Question 1 - Describe how this HTML code produces the form displayed in the browser.

Controlled Assessment Task. Question 1 - Describe how this HTML code produces the form displayed in the browser. Controlled Assessment Task Question 1 - Describe how this HTML code produces the form displayed in the browser. The form s code is displayed in the tags; this creates the object which is the visible

More information

Javascript Lecture 23

Javascript Lecture 23 Javascript Lecture 23 Robb T. Koether Hampden-Sydney College Mar 9, 2012 Robb T. Koether (Hampden-Sydney College) JavascriptLecture 23 Mar 9, 2012 1 / 23 1 Javascript 2 The Document Object Model (DOM)

More information

Course Topics. The Three-Tier Architecture. Example 1: Airline reservations. IT360: Applied Database Systems. Introduction to PHP

Course Topics. The Three-Tier Architecture. Example 1: Airline reservations. IT360: Applied Database Systems. Introduction to PHP Course Topics IT360: Applied Database Systems Introduction to PHP Database design Relational model SQL Normalization PHP MySQL Database administration Transaction Processing Data Storage and Indexing The

More information

Programmazione Web a.a. 2017/2018 HTML5

Programmazione Web a.a. 2017/2018 HTML5 Programmazione Web a.a. 2017/2018 HTML5 PhD Ing.Antonino Raucea antonino.raucea@dieei.unict.it 1 Introduzione HTML HTML is the standard markup language for creating Web pages. HTML stands for Hyper Text

More information

CISC 1600 Lecture 2.4 Introduction to JavaScript

CISC 1600 Lecture 2.4 Introduction to JavaScript CISC 1600 Lecture 2.4 Introduction to JavaScript Topics: Javascript overview The DOM Variables and objects Selection and Repetition Functions A simple animation What is JavaScript? JavaScript is not Java

More information

Client Side JavaScript and AJAX

Client Side JavaScript and AJAX Client Side JavaScript and AJAX Client side javascript is JavaScript that runs in the browsers of people using your site. So far all the JavaScript code we've written runs on our node.js server. This is

More information

Produced by. App Development & Modeling. BSc in Applied Computing. Eamonn de Leastar

Produced by. App Development & Modeling. BSc in Applied Computing. Eamonn de Leastar App Development & Modeling BSc in Applied Computing Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology http://www.wit.ie http://elearning.wit.ie

More information

BEFORE CLASS. If you haven t already installed the Firebug extension for Firefox, download it now from

BEFORE CLASS. If you haven t already installed the Firebug extension for Firefox, download it now from BEFORE CLASS If you haven t already installed the Firebug extension for Firefox, download it now from http://getfirebug.com. If you don t already have the Firebug extension for Firefox, Safari, or Google

More information

CE212 Web Application Programming Part 2

CE212 Web Application Programming Part 2 CE212 Web Application Programming Part 2 22/01/2018 CE212 Part 2 1 JavaScript Event-Handlers 1 JavaScript may be invoked to handle input events on HTML pages, e.g.

More information

Student, Perfect Final Exam May 25, 2006 ID: Exam No CS-081/Vickery Page 1 of 6

Student, Perfect Final Exam May 25, 2006 ID: Exam No CS-081/Vickery Page 1 of 6 Student, Perfect Final Exam May 25, 2006 ID: 9999. Exam No. 3193 CS-081/Vickery Page 1 of 6 NOTE: It is my policy to give a failing grade in the course to any student who either gives or receives aid on

More information

Professional Course in Web Designing & Development 5-6 Months

Professional Course in Web Designing & Development 5-6 Months Professional Course in Web Designing & Development 5-6 Months BASIC HTML Basic HTML Tags Hyperlink Images Form Table CSS 2 Basic use of css Formatting the page with CSS Understanding DIV Make a simple

More information

CS Final Exam Review Suggestions - Spring 2018

CS Final Exam Review Suggestions - Spring 2018 CS 328 - Final Exam Review Suggestions p. 1 CS 328 - Final Exam Review Suggestions - Spring 2018 last modified: 2018-05-03 Based on suggestions from Prof. Deb Pires from UCLA: Because of the research-supported

More information

Static Webpage Development

Static Webpage Development Dear Student, Based upon your enquiry we are pleased to send you the course curriculum for PHP Given below is the brief description for the course you are looking for: - Static Webpage Development Introduction

More information

5/19/2015. Objectives. JavaScript, Sixth Edition. Introduction to the World Wide Web (cont d.) Introduction to the World Wide Web

5/19/2015. Objectives. JavaScript, Sixth Edition. Introduction to the World Wide Web (cont d.) Introduction to the World Wide Web Objectives JavaScript, Sixth Edition Chapter 1 Introduction to JavaScript When you complete this chapter, you will be able to: Explain the history of the World Wide Web Describe the difference between

More information

Birkbeck (University of London)

Birkbeck (University of London) Birkbeck (University of London) MSc Examination Department of Computer Science and Information Systems Internet and Web Technologies (COIY063H7) 15 Credits Date of Examination: 3 June 2016 Duration of

More information

jquery Tutorial for Beginners: Nothing But the Goods

jquery Tutorial for Beginners: Nothing But the Goods jquery Tutorial for Beginners: Nothing But the Goods Not too long ago I wrote an article for Six Revisions called Getting Started with jquery that covered some important things (concept-wise) that beginning

More information

LA TROBE UNIVERSITY SEMESTER ONE EXAMINATION PERIOD CAMPUS AW BE BU MI SH ALLOWABLE MATERIALS

LA TROBE UNIVERSITY SEMESTER ONE EXAMINATION PERIOD CAMPUS AW BE BU MI SH ALLOWABLE MATERIALS LIBRARY USE LA TROBE UNIVERSITY SEMESTER ONE EXAMINATION PERIOD 2013 Student ID: Seat Number: Unit Code: CSE2WD Paper No: 1 Unit Name: Paper Name: Reading Time: Writing Time: Web Development Final 15 minutes

More information

Birkbeck (University of London)

Birkbeck (University of London) Birkbeck (University of London) MSc Examination Department of Computer Science and Information Systems Internet and Web Technologies (COIY063H7) 15 Credits Date of Examination: 13 June 2017 Duration of

More information

CPSC 481: CREATIVE INQUIRY TO WSBF

CPSC 481: CREATIVE INQUIRY TO WSBF CPSC 481: CREATIVE INQUIRY TO WSBF J. Yates Monteith, Fall 2013 Schedule HTML and CSS PHP HTML Hypertext Markup Language Markup Language. Does not execute any computation. Marks up text. Decorates it.

More information

Multimedia im Netz Online Multimedia Winter semester 2015/16

Multimedia im Netz Online Multimedia Winter semester 2015/16 Multimedia im Netz Online Multimedia Winter semester 2015/16 Tutorial 06 Minor Subject Ludwig-Maximilians-Universität München Online Multimedia WS 2015/16 - Tutorial 06 (NF) - 1 Today s Agenda Flashback

More information

Course Information. Todd Sproull Jolley 536 Office Hours by Appointment. Monday and Wednesday 10 11:30 AM

Course Information. Todd Sproull Jolley 536 Office Hours by Appointment. Monday and Wednesday 10 11:30 AM Welcome to CSE 330/503 Creative Programming and Rapid Prototyping Extensible Networking Platform 1 1 - CSE 330 Creative Programming and Rapid Prototyping Course Information Instructor Todd Sproull todd@wustl.edu

More information

c122jan2714.notebook January 27, 2014

c122jan2714.notebook January 27, 2014 Internet Developer 1 Start here! 2 3 Right click on screen and select View page source if you are in Firefox tells the browser you are using html. Next we have the tag and at the

More information

Consider the following file A_Q1.html.

Consider the following file A_Q1.html. Consider the following file A_Q1.html. 1 2 3 Q1A 4 5 6 7 function check () { 8 } 9 10 11

More information

Web Programming Paper Solution (Chapter wise)

Web Programming Paper Solution (Chapter wise) What is valid XML document? Design an XML document for address book If in XML document All tags are properly closed All tags are properly nested They have a single root element XML document forms XML tree

More information

Mobile Site Development

Mobile Site Development Mobile Site Development HTML Basics What is HTML? Editors Elements Block Elements Attributes Make a new line using HTML Headers & Paragraphs Creating hyperlinks Using images Text Formatting Inline styling

More information

ITS331 Information Technology I Laboratory

ITS331 Information Technology I Laboratory ITS331 Information Technology I Laboratory Laboratory #11 Javascript and JQuery Javascript Javascript is a scripting language implemented as a part of most major web browsers. It directly runs on the client's

More information

extc Web Developer Rapid Web Application Development and Ajax Framework Using Ajax

extc Web Developer Rapid Web Application Development and Ajax Framework Using Ajax extc Web Developer Rapid Web Application Development and Ajax Framework Version 3.0.546 Using Ajax Background extc Web Developer (EWD) is a rapid application development environment for building and maintaining

More information

CIS 228 (Spring, 2012) Final, 5/17/12

CIS 228 (Spring, 2012) Final, 5/17/12 CIS 228 (Spring, 2012) Final, 5/17/12 Name (sign) Name (print) email I would prefer to fail than to receive a grade of or lower for this class. Question 1 2 3 4 5 6 7 8 9 A B C D E TOTAL Score CIS 228,

More information

CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0

CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0 WEB TECHNOLOGIES A COMPUTER SCIENCE PERSPECTIVE CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0 Modified by Ahmed Sallam Based on original slides by Jeffrey C. Jackson reserved. 0-13-185603-0 HTML HELLO WORLD! Document

More information

What is Java Script? Writing to The HTML Document. What Can JavaScript do? CMPT 165: Java Script

What is Java Script? Writing to The HTML Document. What Can JavaScript do? CMPT 165: Java Script What is Java Script? CMPT 165: Java Script Tamara Smyth, tamaras@cs.sfu.ca School of Computing Science, Simon Fraser University November 7, 2011 JavaScript was designed to add interactivity to HTML pages

More information

SEEM4570 System Design and Implementation Lecture 03 JavaScript

SEEM4570 System Design and Implementation Lecture 03 JavaScript SEEM4570 System Design and Implementation Lecture 03 JavaScript JavaScript (JS)! Developed by Netscape! A cross platform script language! Mainly used in web environment! Run programs on browsers (HTML

More information

Week 1 - Overview of HTML and Introduction to JavaScript

Week 1 - Overview of HTML and Introduction to JavaScript ITEC 136 Business Programming Concepts Week 1 Module 1: Overview of HTML and Course overview Agenda This week s expected outcomes This week s topics This week s homework Upcoming deadlines Questions and

More information

Govt. of Karnataka, Department of Technical Education Diploma in Computer Science & Engineering. Fifth Semester. Subject: Web Programming

Govt. of Karnataka, Department of Technical Education Diploma in Computer Science & Engineering. Fifth Semester. Subject: Web Programming Govt. of Karnataka, Department of Technical Education Diploma in Computer Science & Engineering Fifth Semester Subject: Web Programming Contact Hrs / week: 4 Total hrs: 64 Table of Contents SN Content

More information

Course Information. Instructor Todd Sproull Jolley 536 Office Hours by Appointment

Course Information. Instructor Todd Sproull Jolley 536 Office Hours by Appointment Welcome to CSE 330/503 Creative Programming and Rapid Prototyping Extensible Networking Platform 1 1 - CSE 330 Creative Programming and Rapid Prototyping Course Information Instructor Todd Sproull todd@wustl.edu

More information

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

Introduction to JavaScript p. 1 JavaScript Myths p. 2 Versions of JavaScript p. 2 Client-Side JavaScript p. 3 JavaScript in Other Contexts p. Preface p. xiii Introduction to JavaScript p. 1 JavaScript Myths p. 2 Versions of JavaScript p. 2 Client-Side JavaScript p. 3 JavaScript in Other Contexts p. 5 Client-Side JavaScript: Executable Content

More information

Understanding this structure is pretty straightforward, but nonetheless crucial to working with HTML, CSS, and JavaScript.

Understanding this structure is pretty straightforward, but nonetheless crucial to working with HTML, CSS, and JavaScript. Extra notes - Markup Languages Dr Nick Hayward HTML - DOM Intro A brief introduction to HTML's document object model, or DOM. Contents Intro What is DOM? Some useful elements DOM basics - an example References

More information

By Ryan Stevenson. Guidebook #2 HTML

By Ryan Stevenson. Guidebook #2 HTML By Ryan Stevenson Guidebook #2 HTML Table of Contents 1. HTML Terminology & Links 2. HTML Image Tags 3. HTML Lists 4. Text Styling 5. Inline & Block Elements 6. HTML Tables 7. HTML Forms HTML Terminology

More information

Review of HTML. Chapter Pearson. Fundamentals of Web Development. Randy Connolly and Ricardo Hoar

Review of HTML. Chapter Pearson. Fundamentals of Web Development. Randy Connolly and Ricardo Hoar Review of HTML Chapter 3 Fundamentals of Web Development 2017 Pearson Fundamentals of Web Development http://www.funwebdev.com - 2 nd Ed. What Is HTML and Where Did It Come from? HTML HTML is defined as

More information

PHP & My SQL Duration-4-6 Months

PHP & My SQL Duration-4-6 Months PHP & My SQL Duration-4-6 Months Overview of the PHP & My SQL Introduction of different Web Technology Working with the web Client / Server Programs Server Communication Sessions Cookies Typed Languages

More information

ENRICHING PRIMO RECORDS WITH INFORMATION FROM WORDPRESS. Karsten Kryger Hansen Aalborg University Library

ENRICHING PRIMO RECORDS WITH INFORMATION FROM WORDPRESS. Karsten Kryger Hansen Aalborg University Library ENRICHING PRIMO RECORDS WITH INFORMATION FROM WORDPRESS Karsten Kryger Hansen Aalborg University Library AGENDA Who am I History and use case Information distribution Detour: HTML, JavaScript etc. in Primo

More information

Brief Introduction to ITU-T H.762 (LIME)

Brief Introduction to ITU-T H.762 (LIME) Brief Introduction to ITU-T H.762 (LIME) ITU-T LIME =Lightweight Interactive Multimedia Environment Not a new language but a simple profile of HTML and Javascript for creating interactive content with

More information

Lecture 3: The Basics of JavaScript. Background. Needs for Programming Capability. Origin of JavaScript. Using Client-side JavaScript

Lecture 3: The Basics of JavaScript. Background. Needs for Programming Capability. Origin of JavaScript. Using Client-side JavaScript Lecture 3: The Basics of JavaScript Wendy Liu CSC309F Fall 2007 Background Origin and facts 1 2 Needs for Programming Capability XHTML and CSS allows the browser to passively display static content How

More information

Javascript. UNIVERSITY OF MASSACHUSETTS AMHERST CMPSCI 120 Fall 2010

Javascript. UNIVERSITY OF MASSACHUSETTS AMHERST CMPSCI 120 Fall 2010 Lecture 21 Javascript Announcements Reminder: beginning with Homework #7, Javascript assignments must be submitted using a format described in an attachment to HW#7 3rd Exam date set for 12/14 in Goessmann

More information

CIS 408 Internet Computing Sunnie Chung

CIS 408 Internet Computing Sunnie Chung Project #2: CIS 408 Internet Computing Sunnie Chung Building a Personal Webpage in HTML and Java Script to Learn How to Communicate Your Web Browser as Client with a Form Element with a Web Server in URL

More information

What is PHP? [1] Figure 1 [1]

What is PHP? [1] Figure 1 [1] PHP What is PHP? [1] PHP is an acronym for "PHP: Hypertext Preprocessor" PHP is a widely-used, open source scripting language PHP scripts are executed on the server PHP is free to download and use Figure

More information

Web Development & Design Foundations with HTML5, 8 th Edition Instructor Materials Chapter 14 Test Bank

Web Development & Design Foundations with HTML5, 8 th Edition Instructor Materials Chapter 14 Test Bank Multiple Choice. Choose the best answer. 1. JavaScript can be described as: a. an object-oriented scripting language b. an easy form of Java c. a language created by Microsoft 2. Select the true statement

More information

Create web pages in HTML with a text editor, following the rules of XHTML syntax and using appropriate HTML tags Create a web page that includes

Create web pages in HTML with a text editor, following the rules of XHTML syntax and using appropriate HTML tags Create a web page that includes CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB By Hassan S. Shavarani UNIT2: MARKUP AND HTML 1 IN THIS UNIT YOU WILL LEARN THE FOLLOWING Create web pages in HTML with a text editor, following

More information

PHP Online Training. PHP Online TrainingCourse Duration - 45 Days. Call us: HTML

PHP Online Training. PHP Online TrainingCourse Duration - 45 Days.  Call us: HTML PHP Online Training PHP is a server-side scripting language designed for web development but also used as a generalpurpose programming language. PHP is now installed on more than 244 million websites and

More information

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

Web Programming and Design. MPT Junior Cycle Tutor: Tamara Demonstrators: Aaron, Marion, Hugh Web Programming and Design MPT Junior Cycle Tutor: Tamara Demonstrators: Aaron, Marion, Hugh Plan for the next 5 weeks: Introduction to HTML tags, creating our template file Introduction to CSS and style

More information

By the end of this section of the practical, the students should be able to:

By the end of this section of the practical, the students should be able to: By the end of this section of the practical, the students should be able to: Learn about the Document Object Model and the Document Object Model hierarchy Create and use the properties, methods and event

More information

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

Web Programming and Design. MPT Junior Cycle Tutor: Tamara Demonstrators: Aaron, Marion, Hugh Web Programming and Design MPT Junior Cycle Tutor: Tamara Demonstrators: Aaron, Marion, Hugh Plan for the next 5 weeks: Introduction to HTML tags, creating our template file Introduction to CSS and style

More information

The first sample. What is JavaScript?

The first sample. What is JavaScript? Java Script Introduction JavaScript is the most popular scripting language on the internet, and works in all major browsers, such as Internet Explorer, Firefox, Chrome, Opera, and Safari. In this lecture

More information

Setting Up a Development Server What Is a WAMP, MAMP, or LAMP? Installing a WAMP on Windows Testing the InstallationAlternative WAMPs Installing a

Setting Up a Development Server What Is a WAMP, MAMP, or LAMP? Installing a WAMP on Windows Testing the InstallationAlternative WAMPs Installing a Setting Up a Development Server What Is a WAMP, MAMP, or LAMP? Installing a WAMP on Windows Testing the InstallationAlternative WAMPs Installing a LAMP on Linux Working Remotely Introduction to web programming

More information

Creating A Simple Calendar in PHP

Creating A Simple Calendar in PHP Creating A Simple Calendar in PHP By In this tutorial, we re going to look at creating calendars in PHP. In this first part of the series we build a simple calendar for display purposes, looking at the

More information

jquery and AJAX

jquery and AJAX jquery and AJAX http://www.flickr.com/photos/pmarkham/3165964414/ Dynamic HTML (DHTML) Manipulating the web page's structure is essential for creating a highly responsive UI Two main approaches Manipulate

More information

JavaScript By: A. Mousavi & P. Broomhead SERG, School of Engineering Design, Brunel University, UK

JavaScript By: A. Mousavi & P. Broomhead SERG, School of Engineering Design, Brunel University, UK Programming for Digital Media EE1707 JavaScript By: A. Mousavi & P. Broomhead SERG, School of Engineering Design, Brunel University, UK 1 References and Sources 1. Javascript & JQuery: interactive front-end

More information

This course is designed for web developers that want to learn HTML5, CSS3, JavaScript and jquery.

This course is designed for web developers that want to learn HTML5, CSS3, JavaScript and jquery. HTML5/CSS3/JavaScript Programming Course Summary Description This class is designed for students that have experience with basic HTML concepts that wish to learn about HTML Version 5, Cascading Style Sheets

More information

Outline. Introduction to JavaScript Resources What is JavaScript? JavaScript in web pages

Outline. Introduction to JavaScript Resources What is JavaScript? JavaScript in web pages JavaScript CMPT 281 Outline Introduction to JavaScript Resources What is JavaScript? JavaScript in web pages Announcements Layout with tables Assignment 3 JavaScript Resources Resources Why JavaScript?

More information

CSC 443: Web Programming

CSC 443: Web Programming 1 CSC 443: Web Programming Haidar Harmanani Department of Computer Science and Mathematics Lebanese American University Byblos, 1401 2010 Lebanon Today 2 Course information Course Objectives A Tiny assignment

More information

Web Programming/Scripting: PHP and AJAX Refresher

Web Programming/Scripting: PHP and AJAX Refresher CS 312 Internet Concepts Web Programming/Scripting: PHP and AJAX Refresher Dr. Michele Weigle Department of Computer Science Old Dominion University mweigle@cs.odu.edu http://www.cs.odu.edu/~mweigle/cs312-f11

More information

Course Topics. IT360: Applied Database Systems. Introduction to PHP

Course Topics. IT360: Applied Database Systems. Introduction to PHP IT360: Applied Database Systems Introduction to PHP Chapter 1 and Chapter 6 in "PHP and MySQL Web Development" Course Topics Relational model SQL Database design Normalization PHP MySQL Database administration

More information

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

COMP519 Web Programming Lecture 16: JavaScript (Part 7) Handouts COMP519 Web Programming Lecture 16: JavaScript (Part 7) Handouts Ullrich Hustadt Department of Computer Science School of Electrical Engineering, Electronics, and Computer Science University of Liverpool

More information

EECS1012. Net-centric Introduction to Computing. Lecture "Putting It All Together" and a little bit of AJAX

EECS1012. Net-centric Introduction to Computing. Lecture Putting It All Together and a little bit of AJAX EECS 1012 Net-centric Introduction to Computing Lecture "Putting It All Together" and a little bit of AJAX Acknowledgements The contents of these slides may be modified and redistributed, please give appropriate

More information

Web Development & Design Foundations with HTML5

Web Development & Design Foundations with HTML5 1 Web Development & Design Foundations with HTML5 CHAPTER 14 A BRIEF LOOK AT JAVASCRIPT Copyright Terry Felke-Morris 2 Learning Outcomes In this chapter, you will learn how to: Describe common uses of

More information