Molecular Biomedical Informatics Web Programming 1.

Slides:



Advertisements
Similar presentations
The Web Wizards Guide To JavaScript Chapter 1 JavaScript Basics.
Advertisements

JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
Java Script Session1 INTRODUCTION.
Introduction to JavaScript
JavaScript and the DOM Les Carr COMP3001 Les Carr COMP3001.
The Document Object Model (DOM) 1 JavaScript is an object-based language—that is, it’s based on manipulating objects by changing each object’s properties.
Document Object Model (DOM) JavaScript manipulation of the DOM.
HTML 5 and CSS 3, Illustrated Complete Unit L: Programming Web Pages with JavaScript.
Molecular Biomedical Informatics 分子生醫資訊實驗室 Web Programming 網際網路程式設計 1.
HTML Recall that HTML is static in that it describes how a page is to be displayed, but it doesn’t provide for interaction or animation. A page created.
Tutorial 13 Working with Objects and Styles. XP Objectives Learn about objects and the document object model Reference documents objects by ID, name,
Social Web Design 社群網站設計 1 Darby Chang 張天豪 Social Web Design 社群網站設計.
JavaScript Demo Presented by … Jaisingh Sumit jain Sudhindra Taran Deep arora.
Forms, Validation Week 7 INFM 603. Announcements Try placing today’s example in htdocs (XAMPP). This will allow you to execute examples that rely on PHP.
Molecular Biomedical Informatics 分子生醫資訊實驗室 Social Web Design & Research 社群網站設計 & 研究 Social Web Design & Research 1.
DHTML - Introduction Introduction to DHTML, the DOM, JS review.
CP476 Internet Computing JavaScript and HTML1 1.JavaScript Execution Environment The JavaScript Window object represents the window in which the browser.
4.1 JavaScript Introduction
JavaScript Teppo Räisänen LIIKE/OAMK HTML, CSS, JavaScript HTML defines the structure CSS defines the layout JavaScript is used for scripting It.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Javascript Languages By Rapee kamoltalapisek ID:
Lesson 19. JavaScript errors Since JavaScript is an interpreted language, syntax errors will usually cause the script to fail. Both browsers will provide.
1 JavaScript. 2 What’s wrong with JavaScript? A very powerful language, yet –Often hated –Browser inconsistencies –Misunderstood –Developers find it painful.
UFCEWT-20-3 Advanced Topics in Web Development Lecture 4 : JavaScript, Browsers & the HTML DOM-API.
Lecture 11 – DOM Scripting SFDV3011 – Advanced Web Development Reference: 1.
Working with Objects Creating a Dynamic Web Page.
JavaScript – The DOM JavaScript is object based The browser is object based – We can access the browser's objects in the same way we did JavaScript's Two.
JavaScript, Fourth Edition
INTRODUCTION TO JAVASCRIPT AND DOM Internet Engineering Spring 2012.
DHTML - Introduction Chapter Introduction to DHTML, the DOM, JS review.
DHTML: Working with Objects Creating a Dynamic Web Page.
INT222 - Internet Fundamentals Shi, Yue (Sunny) Office: T2095 SENECA COLLEGE.
JavaScript Syntax, how to use it in a HTML document
An Introduction to JavaScript By: John Coliton Tuesday, November 10, 1998 Center for Teaching and Learning.
Cs332a_chapt10.ppt CS332A Advanced HTML Programming DHTML Dynamic Hypertext Markup Language A term describing a series of technologies Not a stand-a-lone.
(1) JavaScript. (2) JavaScript vs. Java JavaScript and Java are completely different Java, invented by Sun in 1995, is a complex programming language.
TOPIC II Dynamic HTML Prepared by: Nimcan Cabd Cali.
JavaScript Introduction. Slide 2 Lecture Overview JavaScript background The purpose of JavaScript A first JavaScript example Introduction to getElementById.
4. Javascript M. Udin Harun Al Rasyid, S.Kom, Ph.D Lab Jaringan Komputer (C-307) Desain.
HTML Overview Part 5 – JavaScript 1. Scripts 2  Scripts are used to add dynamic content to a web page.  Scripts consist of a list of commands that execute.
1 Javascript CS , Spring What is Javascript ? Browser scripting language  Dynamic page creation  Interactive  Embedded into HTML pages.
Document Object Model Nasrullah. DOM When a page is loaded,browser creates a Document Object Model of the Page.
HTML DOM Basharat Mahmood, Department of Computer Science, CIIT, Islamabad, Pakistan 1.
JavaScript & Introduction to AJAX
Lesson 30: JavaScript and DHTML Fundamentals. Objectives Define and contrast client-side and server-side technologies used to create dynamic content for.
JavaScript Object Model. Biggest Advantage of JavaScript  I can access values of HTML elements using JavaScript  I can modify values of HTML elements.
JavaScript Introduction inf385t Semantic Web 2/20/2006.
The Web Wizard’s Guide To DHTML and CSS Chapter 2 A Review of CSS2 and JavaScript.
Chapter 13: DHTML: Object Model and Collections CIS 275—Web Application Development for Business I.
Java Script and the DOM DOM stands for: –The Document Object Model When a browser reads a web page, it converts it’s contents from HTML into a hierarchical.
Build in Objects In JavaScript, almost "everything" is an object.
Web Basics: HTML/CSS/JavaScript What are they?
Programming Web Pages with JavaScript
Just enough to get going!
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Internet of the Past.
CS5220 Advanced Topics in Web Programming JavaScript and jQuery
Scripting the DOM MIS 3502, Fall 2016 Jeremy Shafer Department of MIS
CGS 3066: Web Programming and Design Spring 2017
CGS 3066: Web Programming and Design Spring 2016
Intro to JavaScript CS 1150 Spring 2017.
The Internet and HTML Code
JavaScript Introduction
CT Web Development, Colorado State University
Document Object Model (DOM): Objects and Collections
Unit 6 part 3 Test Javascript Test.
Introduction to DHTML, the DOM, JS review
JavaScript.
Murach's JavaScript and jQuery (3rd Ed.)
Presentation transcript:

Molecular Biomedical Informatics Web Programming 1

JavaScript 2 Web Programming

JavaScript Executed by browser –completely different to Java –script language ( ) So, it is just a programming language –for example, it can accumulate from one to ten –notice that it is executed by browser, which means no internet connection is required Its survival is a miracle –heard of Netscape? Web Programming 3

Its advantage: integration with web When integrating with web, the most important thing is to show the result document.getElementById('foo').value='bar'; –document is an object of Document Object Model (DOM) –getElementById () is a method of document, which returns a DOM object –value is a attribute of an input object, where #foo is a You may consult HTML and CSS references for available properties and here for objects and methodshere Web Programming 4

How to select.foo objects? JavaScript getElementsByClass function function getElementsByClass(searchClass, domNode, tagName) { if (domNode == null) domNode = document; if (tagName == null) tagName = '*'; var el = new Array(); var tags = domNode.getElementsByTagName(tagName); var sc = " "+searchClass+" "; for (i=0, j=0; i<tags.length; ++i) { var tc = " " + tags[i].className + " "; if (tc.indexOf(sc) != -1) el[j++] = tags[i]; } return el; } Painful Web Programming 5

jQuery A Javascript library that every web site should use What is a library (module)? If many people do the same things, these things should become a library The advantage is that code becomes simple and understandable –jQuery('.foo').val('bar'); The disadvantage is that you have to learn more functions, but totally worthy –Main Page - jQuery JavaScript LibraryMain Page - jQuery JavaScript Library Web Programming 6

jQuery('.foo').css('color','red'); Web Programming 7 Understand this, and you know almost all fancy transitions Remember the CSS Zen Garden?CSS Zen Garden

More advanced function, animate() jQuery('.foo').animate({ 'margin-left': '100px', }, 2000, function(){ // animation completed }); Web Programming 8

9 In addition to show the result, there is another important things while integrating with web

Input (event) All web transitions are caused by events (such as clicking a button). This is the so-called event-driven programming ( ) –not specific for web programming, windows programming ( ) and any programing in a multi-tasking environment ( ) are based on such a concept jQuery('#foo').click(function(){…}); –jQuerify is a good tool to test jQueryjQuerify –suppose that #foo is a –click is an event (.click() - jQuery API).click() - jQuery API –Here we used the trick of anonymous function. Please be familiar with it since this field uses it a lot. Web Programming 10

JavaScript references JavaScript Garden Learn jQuery & JAVASCRIPT for free Some interesting concepts widely used, but not unique, in JavaScript –anonymous function, callback function, closure, functional programming ( Functional Programming ) Functional Programming Notice that they are for JavaScript rather than for web programing with JavaScript Web Programming 11

Any Questions? Web Programming 12

Develop an app with these techniques WebView Various frameworks –box2dwebbox2dweb Cross-platform Web Programming 13

Todays assignment Web Programming 14

Make your web site dynamic Implement at least one dynamic effect (see these sample effects for some inspiration) for your future requirements. If you have no ideas, try a slideshow facility, which makes your web site more professional.seethesesampleeffectsfor someinspiration Reference –8 Layout Solutions To Improve Your Designs8 Layout Solutions To Improve Your Designs –40 Super-Neat JavaScript Plugins40 Super-Neat JavaScript Plugins –45+ New jQuery Techniques For Good User Experience45+ New jQuery Techniques For Good User Experience Your web site ( will be checked not before 23:59 10/14 (Sun). You may send a report (such as some important modifications) to me in case I did not notice your features. Web Programming 15

Appendix 16 Web Programming

If we have time, I want to discuss… Any web effects you want to learn? JavaScript Garden Web Programming 17