SlideShare a Scribd company logo
Java Script
Session No 1

1

Developed By: Saif Ullah Dar

11/22/2013
Session Objectives
1)
2)
3)
4)
5)
6)
7)
8)

9)
10)

What is Java Script?
How a Java Script Work?
What Java Script Can Do?
Browsers Issue.
When Not To Use Java Script?
Java & Java Script.
Usage of Java Script?
How to Use the Java Script?
Types of Scripting.
Your First Program in Java Script.
2

Developed By: Saif Ullah Dar

11/22/2013
What is Java Script ?
•

JavaScript was originally developed by Brendan Eich of Netscape under the
name Mocha, which was later renamed to LiveScript, and finally to JavaScript

•

A lightweight programming language that runs in a Web browser

•

JavaScript is a Client Side Scripting Language.

•

Also known as ECMAScript

•

Interpreted, not compiled.

•

JavaScript Syntax are similar to C and Java Language.

•

JavaScript code is usually embedded directly into HTML pages

•

JavaScript is reasonably platform-independent

3

Developed By: Saif Ullah Dar

11/22/2013
What is code can be inserted directly inthe HTML or
Java Script ?
 JavaScript




can place it in a separate file with the .js extension and
link the web page with the .js file.
Use in web browser for making a website more dynamic.
Supported by Netscape 2+, Internet Explorer 3+, Opera
3+ and most of the other modern web browsers.
Contains variable, array,object,operators and function.

4

Developed By: Saif Ullah Dar

11/22/2013
What is Java Script ?






Browser downloads the code and run it.
Manipulates HTML object also known as DOM, such as
form items, anchors.
Unrelated to Java, despite the name.
It was developed to create a dynamic website.
AJAX has given a brand new look to JavaScript; Now
JavaScript has become more important than ever.

5

Developed By: Saif Ullah Dar

11/22/2013
How a Java Script Work?

6

Developed By: Saif Ullah Dar

11/22/2013
What a Java Script Can 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

7

Developed By: Saif Ullah Dar

11/22/2013
Browsers Issue






Different browsers implements different versions of
JavaScript.
Some browsers like Internet Explorer even add their own
functions to enhance the code.
Every JavaScript codes does not work in every browser;
therefore code should be written with the user
demographic in mind.
Newer browsers are adopting standard JavaScript; also
known as “Class A” browsers.

8

Developed By: Saif Ullah Dar

11/22/2013
When Not access other resources. Script
To Use Java
• When you need to
•
•
•

Files Programs
Databases

When you are using sensitive or copyrighted data or algorithms.
• Your JavaScript code is open to the public

9

Developed By: Saif Ullah Dar

11/22/2013
JavaJavaScriptJava Scriptlanguages in both concept and design!
& are two completely different
Java and
1)
2)

JavaScript has some features that resemble features in Java:
1)
2)

JavaScript has qualified names; for example, document.write("Hello World");

3)

JavaScript has Events and event handlers

4)

3)

JavaScript has Objects and primitive data types

Exception handling in JavaScript is almost the same as in Java

JavaScript has some features unlike anything in Java:
1)

Variable names are untyped: the type of a variable depends on the value it is currently holding

2)

Objects and arrays are defined in quite a different way

3)

JavaScript is an interpreted language but java is both interpreted and compiled

10

Developed By: Saif Ullah Dar

11/22/2013
Java & Java Script
Java

JavaScript

Sun Microsystems

Netscape

Much larger and advanced set of
commands.

Much smaller and simpler set of
commands .

Applets distinct from HTML
(accessed from HTML pages).

Code integrated with, and
embedded in, HTML.

Variable data types must be
declared (strong typing).

Variable data types not declared
(loose typing).

Compiled on server before
execution on client.

Interpreted (not compiled) by
client.

11

Developed By: Saif Ullah Dar

11/22/2013
Usage of Java Script that would otherwise
 Used to perform operations





encumber the server, like form validation input.
Can be easily used to interact with HTML elements such
as validate text fields, disable buttons, validate forms, or
change the background color of page.
Create dynamic page
React to events such the user enter name whenever the
page load for 1st time. User can used entered value for
welcome page.

12

Developed By: Saif Ullah Dar

11/22/2013
How To Use Java Script?
 JavaScript can be implemented in three basic styles.






Embed in Body of the document.
Embed in Header of the document.
Load from an external (.js) file.

Embed in Body of the document






This is the easiest way to implement JavaScript.
Embed where needed using <script>…</script>.
This is very poor way of implementation as the functions
cannot be easily reused.
Script is not available for the part of the document which is
above the implantation.
Difficult to manage codes.
13

Developed By: Saif Ullah Dar

11/22/2013
How To Use Java Script?


Embed in Header of the document







Here <script>…</script> is implemented before the <body>
tag.
This ensures that JavaScript functions are available for all the
parts of the documents (DOMs).
Cannot be applied across multiple documents (webpages).
Changes have to be replicated across multiple documents
manually.
Does not make the JavaScript code independent.
More codes.

14

Developed By: Saif Ullah Dar

11/22/2013
How To Useexternal (.js) file
Java Script?
 Load from an









Most efficient way of implementing JavaScript Codes.
Multiple documents can reference single JavaScript files using <script
src=“JSPATH”></script>.
Changes in the script file with automatically reflected to all the
documents that references it.
This enables true separation of header components.
One weakness of this implementation is that a page has to load all
the JavaScript codes regardless it uses it or not. This is helped by
caching; but what if the js file becomes multiple megabytes in size
(this has become true in newer AJAX-enabled website).
One way to overcome this weakness is that breaking up the file into
multiple files and load dynamically only when a function is needed.
AJAX makes this possible.

15

Developed By: Saif Ullah Dar

11/22/2013
Dynamic Load of JavaScript File









With the explosion of AJAX enabled components like JavaScript
trees and grids, JS files tend to become very large – often in multiple
megabytes.
Large files makes the web application slow due to net transfer and
browser processing of large files.
An ideal solution will be only download only the part of the file,
whose function is called.
This can be accomplished by creating multiple files with relevant
piece of the code.
When the function that resides in a file is called; dynamically
download the JS file with that function and load it to the browser –
after it loads to the browser then only execute the function.
All this process should happen within few seconds.

16

Developed By: Saif Ullah Dar

11/22/2013
When to Use JavaScript?







Previously JavaScript was restricted to form validation and
interaction with HTML objects.
Now AJAX (which is basically a JavaScript
implementation) enables us to do more than just
validation.
It is used to fetch data without refreshing the page.
It is used to fetch only the required data and modify only
the part of the webpage.
If you have a high traffic website, JavaScript is a must for
form validation so that it is less burden for the server.

17

Developed By: Saif Ullah Dar

11/22/2013
When NOT to use
JavaScript?






Since all the codes of JavaScript is available to the public; it is
advisable not to put confidential business logic in the JavaScript
code.
As JavaScript runs in client machine you cannot use it to
interact with the files and databases in the server.You would
need an intermediary language like ASP.Net, PHP and CGI to
do the server functions.
If you need some of your data to be indexed by Search
Engines; it is advisable to fetch data in static manner, instead of
using AJAX. Till date Search Engines are not very AJAX friendly.

18

Developed By: Saif Ullah Dar

11/22/2013
Types Of Scripting
Scripting refers to a series of commands that are
interpreted and executed sequentially and immediately on
an occurrence of an event

19

Developed By: Saif Ullah Dar

11/22/2013
Types Of Scripting



Client side Scripting: Refer to a script being executed on the client’s
machine by the browser.
Server side Scripting: Refer to a script being executed on Web
server to generate dynamic HTML pages.

20

Developed By: Saif Ullah Dar

11/22/2013
<SCRIPT> Tag





The <SCRIPT> tag defines a script for an HTML page to make
them interactive
There are two main purpose of the <SCRIPT> tag, which are:
Identifies a given segment of script in the HTML page.
Load an external script file .

21

Developed By: Saif Ullah Dar

11/22/2013
Your First Code:

Ex.1

(Output)
Java Script at the first
sight.

22

Developed By: Saif Ullah Dar

11/22/2013
Your First Code:

Ex.1

html opening
tag

23

Developed By: Saif Ullah Dar

11/22/2013
Your First Code:

Ex.1

html opening tag

Usually Java Scripts
are included within
the head tag, it
also could be
included in the
body tag.

24

Developed By: Saif Ullah Dar

11/22/2013
Your First Code:

Ex.1
html opening tag

One reason
JavaScript is so
popular is that it's
relatively easy to
add JavaScript to a
web page

25

JavaScript
Code block

Developed By: Saif Ullah Dar

Usually Java Scripts
are included within
the head tag, it
also could be
included in the
body tag.

11/22/2013
Your First Code:

Ex.1
<script> tag: Indicate
that the text is part of a
script

26

Developed By: Saif Ullah Dar

11/22/2013
Your First Code:

Ex.1
type attribute:
Specifies the type of file and
the scripting language use.

27

Developed By: Saif Ullah Dar

11/22/2013
Code:

Ex.1

<script> tag:
Indicate that the text
is part of a script

type attribute:
Specifies the type of
file and the scripting
language use.
</script>
End or Close
Tag

28

Developed By: Saif Ullah Dar

11/22/2013
Your First Code:

Ex.1

A Method used
to output a
string onto the
Browser

29

Developed By: Saif Ullah Dar

11/22/2013
Your First Code:

Ex.1

The string, that writeln method
takes and printout on the
browser.
Whatever between the
quotations mark will be printed
as is.

A Method used to output a string
onto the Browser

30

Developed By: Saif Ullah Dar

11/22/2013
Execute Ex.1:

31

Output

Developed By: Saif Ullah Dar

11/22/2013
Thank You
Saif Ullah Dar

32

Developed By: Saif Ullah Dar

11/22/2013

More Related Content

What's hot

Java script final presentation
Java script final presentationJava script final presentation
Java script final presentationAdhoura Academy
 
JavaScript guide 2020 Learn JavaScript
JavaScript guide 2020 Learn JavaScriptJavaScript guide 2020 Learn JavaScript
JavaScript guide 2020 Learn JavaScript
Laurence Svekis ✔
 
Java script
Java scriptJava script
Java script
reddivarihareesh
 
Java scripts
Java scriptsJava scripts
Java scripts
Capgemini India
 
Basics java scripts
Basics java scriptsBasics java scripts
Basics java scriptsch samaram
 
Introduction to java script
Introduction to java scriptIntroduction to java script
Introduction to java script
DivyaKS12
 
A quick guide to Css and java script
A quick guide to Css and  java scriptA quick guide to Css and  java script
A quick guide to Css and java script
AVINASH KUMAR
 
Java script -23jan2015
Java script -23jan2015Java script -23jan2015
Java script -23jan2015
Sasidhar Kothuru
 
Java script
Java scriptJava script
Java script
ITz_1
 
Java script
Java scriptJava script
Java script
Jay Patel
 
Javascript
JavascriptJavascript
Javascript
Sun Technlogies
 
Web programming
Web programmingWeb programming
Web programming
Leo Mark Villar
 
Java script basics
Java script basicsJava script basics
Java script basics
Shrivardhan Limbkar
 
Java Script ppt
Java Script pptJava Script ppt
Java Script ppt
Priya Goyal
 
Java script
Java scriptJava script
Java script
Fajar Baskoro
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
Marlon Jamera
 
Java Script
Java ScriptJava Script
Java Script
husbancom
 
Java script
Java scriptJava script
Java script
Shyam Khant
 

What's hot (20)

Javascript by geetanjali
Javascript by geetanjaliJavascript by geetanjali
Javascript by geetanjali
 
Java script final presentation
Java script final presentationJava script final presentation
Java script final presentation
 
JavaScript guide 2020 Learn JavaScript
JavaScript guide 2020 Learn JavaScriptJavaScript guide 2020 Learn JavaScript
JavaScript guide 2020 Learn JavaScript
 
Java script
Java scriptJava script
Java script
 
Java scripts
Java scriptsJava scripts
Java scripts
 
Basics java scripts
Basics java scriptsBasics java scripts
Basics java scripts
 
Introduction to java script
Introduction to java scriptIntroduction to java script
Introduction to java script
 
A quick guide to Css and java script
A quick guide to Css and  java scriptA quick guide to Css and  java script
A quick guide to Css and java script
 
Java script -23jan2015
Java script -23jan2015Java script -23jan2015
Java script -23jan2015
 
Java script
Java scriptJava script
Java script
 
Java script
Java scriptJava script
Java script
 
Javascript
JavascriptJavascript
Javascript
 
Web programming
Web programmingWeb programming
Web programming
 
Html JavaScript and CSS
Html JavaScript and CSSHtml JavaScript and CSS
Html JavaScript and CSS
 
Java script basics
Java script basicsJava script basics
Java script basics
 
Java Script ppt
Java Script pptJava Script ppt
Java Script ppt
 
Java script
Java scriptJava script
Java script
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 
Java Script
Java ScriptJava Script
Java Script
 
Java script
Java scriptJava script
Java script
 

Viewers also liked

An Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java ScriptAn Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java Script
Fahim Abdullah
 
Session No1
Session No1 Session No1
Session No1
Saif Ullah Dar
 
C programming session 07
C programming session 07C programming session 07
C programming session 07Dushmanta Nath
 
C programming session 11
C programming session 11C programming session 11
C programming session 11Dushmanta Nath
 
C programming session 09
C programming session 09C programming session 09
C programming session 09Dushmanta Nath
 
C programming session 03
C programming session 03C programming session 03
C programming session 03Dushmanta Nath
 
C programming session 08
C programming session 08C programming session 08
C programming session 08Dushmanta Nath
 
C programming session 05
C programming session 05C programming session 05
C programming session 05Dushmanta Nath
 
C programming session 04
C programming session 04C programming session 04
C programming session 04Dushmanta Nath
 
C programming session 02
C programming session 02C programming session 02
C programming session 02Dushmanta Nath
 
C programming session 01
C programming session 01C programming session 01
C programming session 01Dushmanta Nath
 
Java Script
Java ScriptJava Script
Java Script
siddaram
 
The big bang theory of social recruiting
The big bang theory of social recruitingThe big bang theory of social recruiting
The big bang theory of social recruiting
FastCollab
 
Unchallengeable miracle of Holy Quran
Unchallengeable miracle of  Holy QuranUnchallengeable miracle of  Holy Quran
Unchallengeable miracle of Holy Quran
yoursincerefriend
 
JAVA SCRIPT
JAVA SCRIPTJAVA SCRIPT
JAVA SCRIPT
Go4Guru
 
8. java script
8. java script8. java script
8. java script
AnusAhmad
 
The Big Bang Theory: Nine Steps To Building Your Meetup Empire
The Big Bang Theory: Nine Steps To Building Your Meetup EmpireThe Big Bang Theory: Nine Steps To Building Your Meetup Empire
The Big Bang Theory: Nine Steps To Building Your Meetup EmpireSeh Hui Leong
 
Introduction to JavaScript: Week Two
Introduction to JavaScript: Week TwoIntroduction to JavaScript: Week Two
Introduction to JavaScript: Week TwoEvent Handler
 

Viewers also liked (20)

An Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java ScriptAn Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java Script
 
Session No1
Session No1 Session No1
Session No1
 
Session no 2
Session no 2Session no 2
Session no 2
 
C programming session 07
C programming session 07C programming session 07
C programming session 07
 
Session no 4
Session no 4Session no 4
Session no 4
 
C programming session 11
C programming session 11C programming session 11
C programming session 11
 
C programming session 09
C programming session 09C programming session 09
C programming session 09
 
C programming session 03
C programming session 03C programming session 03
C programming session 03
 
C programming session 08
C programming session 08C programming session 08
C programming session 08
 
C programming session 05
C programming session 05C programming session 05
C programming session 05
 
C programming session 04
C programming session 04C programming session 04
C programming session 04
 
C programming session 02
C programming session 02C programming session 02
C programming session 02
 
C programming session 01
C programming session 01C programming session 01
C programming session 01
 
Java Script
Java ScriptJava Script
Java Script
 
The big bang theory of social recruiting
The big bang theory of social recruitingThe big bang theory of social recruiting
The big bang theory of social recruiting
 
Unchallengeable miracle of Holy Quran
Unchallengeable miracle of  Holy QuranUnchallengeable miracle of  Holy Quran
Unchallengeable miracle of Holy Quran
 
JAVA SCRIPT
JAVA SCRIPTJAVA SCRIPT
JAVA SCRIPT
 
8. java script
8. java script8. java script
8. java script
 
The Big Bang Theory: Nine Steps To Building Your Meetup Empire
The Big Bang Theory: Nine Steps To Building Your Meetup EmpireThe Big Bang Theory: Nine Steps To Building Your Meetup Empire
The Big Bang Theory: Nine Steps To Building Your Meetup Empire
 
Introduction to JavaScript: Week Two
Introduction to JavaScript: Week TwoIntroduction to JavaScript: Week Two
Introduction to JavaScript: Week Two
 

Similar to Java script Session No 1

INTRODUCTION.docx
INTRODUCTION.docxINTRODUCTION.docx
INTRODUCTION.docx
KaiSane1
 
Javascript 01 (js)
Javascript 01 (js)Javascript 01 (js)
Javascript 01 (js)
AbhishekMondal42
 
wt mod3.pdf
wt mod3.pdfwt mod3.pdf
wt mod3.pdf
VinayKumarV24
 
Front End Development | Introduction
Front End Development | IntroductionFront End Development | Introduction
Front End Development | Introduction
JohnTaieb
 
Java script Basic
Java script BasicJava script Basic
Java script Basic
Jaya Kumari
 
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTHWEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
Bhavsingh Maloth
 
Web programming UNIT II by Bhavsingh Maloth
Web programming UNIT II by Bhavsingh MalothWeb programming UNIT II by Bhavsingh Maloth
Web programming UNIT II by Bhavsingh Maloth
Bhavsingh Maloth
 
5 Powerful Backend Frameworks for Web App Development in 2022
5 Powerful Backend Frameworks for Web App Development in 20225 Powerful Backend Frameworks for Web App Development in 2022
5 Powerful Backend Frameworks for Web App Development in 2022
75waytechnologies
 
Making Of PHP Based Web Application
Making Of PHP Based Web ApplicationMaking Of PHP Based Web Application
Making Of PHP Based Web Application
Sachin Walvekar
 
Javascript & Jquery
Javascript & JqueryJavascript & Jquery
Javascript & Jquery
Gurpreet singh
 
Java script by Act Academy
Java script by Act AcademyJava script by Act Academy
Java script by Act Academy
actanimation
 
Web summit.pptx
Web summit.pptxWeb summit.pptx
Web summit.pptx
171SagnikRoy
 
Reactjs Basics
Reactjs BasicsReactjs Basics
Reactjs Basics
Hamid Ghorbani
 
Unit 4 Java script.pptx
Unit 4 Java script.pptxUnit 4 Java script.pptx
Unit 4 Java script.pptx
Gangesh8
 
Introduction to Jquery
Introduction to JqueryIntroduction to Jquery
Introduction to Jquery
Gurpreet singh
 
Javascript frameworks
Javascript frameworksJavascript frameworks
Javascript frameworks
RajkumarJangid7
 
Web II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side developmentWeb II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side development
Randy Connolly
 
9 Best JavaScript Frameworks To Choose
9 Best JavaScript Frameworks To Choose9 Best JavaScript Frameworks To Choose
9 Best JavaScript Frameworks To Choose
Albiorix Technology
 
Java Script - A New Look
Java Script - A New LookJava Script - A New Look
Java Script - A New Lookrumsan
 
Node.js
Node.jsNode.js

Similar to Java script Session No 1 (20)

INTRODUCTION.docx
INTRODUCTION.docxINTRODUCTION.docx
INTRODUCTION.docx
 
Javascript 01 (js)
Javascript 01 (js)Javascript 01 (js)
Javascript 01 (js)
 
wt mod3.pdf
wt mod3.pdfwt mod3.pdf
wt mod3.pdf
 
Front End Development | Introduction
Front End Development | IntroductionFront End Development | Introduction
Front End Development | Introduction
 
Java script Basic
Java script BasicJava script Basic
Java script Basic
 
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTHWEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
 
Web programming UNIT II by Bhavsingh Maloth
Web programming UNIT II by Bhavsingh MalothWeb programming UNIT II by Bhavsingh Maloth
Web programming UNIT II by Bhavsingh Maloth
 
5 Powerful Backend Frameworks for Web App Development in 2022
5 Powerful Backend Frameworks for Web App Development in 20225 Powerful Backend Frameworks for Web App Development in 2022
5 Powerful Backend Frameworks for Web App Development in 2022
 
Making Of PHP Based Web Application
Making Of PHP Based Web ApplicationMaking Of PHP Based Web Application
Making Of PHP Based Web Application
 
Javascript & Jquery
Javascript & JqueryJavascript & Jquery
Javascript & Jquery
 
Java script by Act Academy
Java script by Act AcademyJava script by Act Academy
Java script by Act Academy
 
Web summit.pptx
Web summit.pptxWeb summit.pptx
Web summit.pptx
 
Reactjs Basics
Reactjs BasicsReactjs Basics
Reactjs Basics
 
Unit 4 Java script.pptx
Unit 4 Java script.pptxUnit 4 Java script.pptx
Unit 4 Java script.pptx
 
Introduction to Jquery
Introduction to JqueryIntroduction to Jquery
Introduction to Jquery
 
Javascript frameworks
Javascript frameworksJavascript frameworks
Javascript frameworks
 
Web II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side developmentWeb II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side development
 
9 Best JavaScript Frameworks To Choose
9 Best JavaScript Frameworks To Choose9 Best JavaScript Frameworks To Choose
9 Best JavaScript Frameworks To Choose
 
Java Script - A New Look
Java Script - A New LookJava Script - A New Look
Java Script - A New Look
 
Node.js
Node.jsNode.js
Node.js
 

More from Saif Ullah Dar

Session no 2 For BZU
Session no 2 For BZUSession no 2 For BZU
Session no 2 For BZU
Saif Ullah Dar
 
Xml Session No 1
Xml Session No 1Xml Session No 1
Xml Session No 1
Saif Ullah Dar
 

More from Saif Ullah Dar (7)

Session no 3
Session no 3Session no 3
Session no 3
 
Session no 1
Session no 1Session no 1
Session no 1
 
Session no 1 html
Session no 1 htmlSession no 1 html
Session no 1 html
 
Session no 3 bzu
Session no 3 bzuSession no 3 bzu
Session no 3 bzu
 
Session no 2 For BZU
Session no 2 For BZUSession no 2 For BZU
Session no 2 For BZU
 
Java script session 4
Java script session 4Java script session 4
Java script session 4
 
Xml Session No 1
Xml Session No 1Xml Session No 1
Xml Session No 1
 

Recently uploaded

Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 

Recently uploaded (20)

Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 

Java script Session No 1

  • 1. Java Script Session No 1 1 Developed By: Saif Ullah Dar 11/22/2013
  • 2. Session Objectives 1) 2) 3) 4) 5) 6) 7) 8) 9) 10) What is Java Script? How a Java Script Work? What Java Script Can Do? Browsers Issue. When Not To Use Java Script? Java & Java Script. Usage of Java Script? How to Use the Java Script? Types of Scripting. Your First Program in Java Script. 2 Developed By: Saif Ullah Dar 11/22/2013
  • 3. What is Java Script ? • JavaScript was originally developed by Brendan Eich of Netscape under the name Mocha, which was later renamed to LiveScript, and finally to JavaScript • A lightweight programming language that runs in a Web browser • JavaScript is a Client Side Scripting Language. • Also known as ECMAScript • Interpreted, not compiled. • JavaScript Syntax are similar to C and Java Language. • JavaScript code is usually embedded directly into HTML pages • JavaScript is reasonably platform-independent 3 Developed By: Saif Ullah Dar 11/22/2013
  • 4. What is code can be inserted directly inthe HTML or Java Script ?  JavaScript    can place it in a separate file with the .js extension and link the web page with the .js file. Use in web browser for making a website more dynamic. Supported by Netscape 2+, Internet Explorer 3+, Opera 3+ and most of the other modern web browsers. Contains variable, array,object,operators and function. 4 Developed By: Saif Ullah Dar 11/22/2013
  • 5. What is Java Script ?      Browser downloads the code and run it. Manipulates HTML object also known as DOM, such as form items, anchors. Unrelated to Java, despite the name. It was developed to create a dynamic website. AJAX has given a brand new look to JavaScript; Now JavaScript has become more important than ever. 5 Developed By: Saif Ullah Dar 11/22/2013
  • 6. How a Java Script Work? 6 Developed By: Saif Ullah Dar 11/22/2013
  • 7. What a Java Script Can 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 7 Developed By: Saif Ullah Dar 11/22/2013
  • 8. Browsers Issue     Different browsers implements different versions of JavaScript. Some browsers like Internet Explorer even add their own functions to enhance the code. Every JavaScript codes does not work in every browser; therefore code should be written with the user demographic in mind. Newer browsers are adopting standard JavaScript; also known as “Class A” browsers. 8 Developed By: Saif Ullah Dar 11/22/2013
  • 9. When Not access other resources. Script To Use Java • When you need to • • • Files Programs Databases When you are using sensitive or copyrighted data or algorithms. • Your JavaScript code is open to the public 9 Developed By: Saif Ullah Dar 11/22/2013
  • 10. JavaJavaScriptJava Scriptlanguages in both concept and design! & are two completely different Java and 1) 2) JavaScript has some features that resemble features in Java: 1) 2) JavaScript has qualified names; for example, document.write("Hello World"); 3) JavaScript has Events and event handlers 4) 3) JavaScript has Objects and primitive data types Exception handling in JavaScript is almost the same as in Java JavaScript has some features unlike anything in Java: 1) Variable names are untyped: the type of a variable depends on the value it is currently holding 2) Objects and arrays are defined in quite a different way 3) JavaScript is an interpreted language but java is both interpreted and compiled 10 Developed By: Saif Ullah Dar 11/22/2013
  • 11. Java & Java Script Java JavaScript Sun Microsystems Netscape Much larger and advanced set of commands. Much smaller and simpler set of commands . Applets distinct from HTML (accessed from HTML pages). Code integrated with, and embedded in, HTML. Variable data types must be declared (strong typing). Variable data types not declared (loose typing). Compiled on server before execution on client. Interpreted (not compiled) by client. 11 Developed By: Saif Ullah Dar 11/22/2013
  • 12. Usage of Java Script that would otherwise  Used to perform operations    encumber the server, like form validation input. Can be easily used to interact with HTML elements such as validate text fields, disable buttons, validate forms, or change the background color of page. Create dynamic page React to events such the user enter name whenever the page load for 1st time. User can used entered value for welcome page. 12 Developed By: Saif Ullah Dar 11/22/2013
  • 13. How To Use Java Script?  JavaScript can be implemented in three basic styles.     Embed in Body of the document. Embed in Header of the document. Load from an external (.js) file. Embed in Body of the document      This is the easiest way to implement JavaScript. Embed where needed using <script>…</script>. This is very poor way of implementation as the functions cannot be easily reused. Script is not available for the part of the document which is above the implantation. Difficult to manage codes. 13 Developed By: Saif Ullah Dar 11/22/2013
  • 14. How To Use Java Script?  Embed in Header of the document       Here <script>…</script> is implemented before the <body> tag. This ensures that JavaScript functions are available for all the parts of the documents (DOMs). Cannot be applied across multiple documents (webpages). Changes have to be replicated across multiple documents manually. Does not make the JavaScript code independent. More codes. 14 Developed By: Saif Ullah Dar 11/22/2013
  • 15. How To Useexternal (.js) file Java Script?  Load from an       Most efficient way of implementing JavaScript Codes. Multiple documents can reference single JavaScript files using <script src=“JSPATH”></script>. Changes in the script file with automatically reflected to all the documents that references it. This enables true separation of header components. One weakness of this implementation is that a page has to load all the JavaScript codes regardless it uses it or not. This is helped by caching; but what if the js file becomes multiple megabytes in size (this has become true in newer AJAX-enabled website). One way to overcome this weakness is that breaking up the file into multiple files and load dynamically only when a function is needed. AJAX makes this possible. 15 Developed By: Saif Ullah Dar 11/22/2013
  • 16. Dynamic Load of JavaScript File       With the explosion of AJAX enabled components like JavaScript trees and grids, JS files tend to become very large – often in multiple megabytes. Large files makes the web application slow due to net transfer and browser processing of large files. An ideal solution will be only download only the part of the file, whose function is called. This can be accomplished by creating multiple files with relevant piece of the code. When the function that resides in a file is called; dynamically download the JS file with that function and load it to the browser – after it loads to the browser then only execute the function. All this process should happen within few seconds. 16 Developed By: Saif Ullah Dar 11/22/2013
  • 17. When to Use JavaScript?      Previously JavaScript was restricted to form validation and interaction with HTML objects. Now AJAX (which is basically a JavaScript implementation) enables us to do more than just validation. It is used to fetch data without refreshing the page. It is used to fetch only the required data and modify only the part of the webpage. If you have a high traffic website, JavaScript is a must for form validation so that it is less burden for the server. 17 Developed By: Saif Ullah Dar 11/22/2013
  • 18. When NOT to use JavaScript?    Since all the codes of JavaScript is available to the public; it is advisable not to put confidential business logic in the JavaScript code. As JavaScript runs in client machine you cannot use it to interact with the files and databases in the server.You would need an intermediary language like ASP.Net, PHP and CGI to do the server functions. If you need some of your data to be indexed by Search Engines; it is advisable to fetch data in static manner, instead of using AJAX. Till date Search Engines are not very AJAX friendly. 18 Developed By: Saif Ullah Dar 11/22/2013
  • 19. Types Of Scripting Scripting refers to a series of commands that are interpreted and executed sequentially and immediately on an occurrence of an event 19 Developed By: Saif Ullah Dar 11/22/2013
  • 20. Types Of Scripting   Client side Scripting: Refer to a script being executed on the client’s machine by the browser. Server side Scripting: Refer to a script being executed on Web server to generate dynamic HTML pages. 20 Developed By: Saif Ullah Dar 11/22/2013
  • 21. <SCRIPT> Tag     The <SCRIPT> tag defines a script for an HTML page to make them interactive There are two main purpose of the <SCRIPT> tag, which are: Identifies a given segment of script in the HTML page. Load an external script file . 21 Developed By: Saif Ullah Dar 11/22/2013
  • 22. Your First Code: Ex.1 (Output) Java Script at the first sight. 22 Developed By: Saif Ullah Dar 11/22/2013
  • 23. Your First Code: Ex.1 html opening tag 23 Developed By: Saif Ullah Dar 11/22/2013
  • 24. Your First Code: Ex.1 html opening tag Usually Java Scripts are included within the head tag, it also could be included in the body tag. 24 Developed By: Saif Ullah Dar 11/22/2013
  • 25. Your First Code: Ex.1 html opening tag One reason JavaScript is so popular is that it's relatively easy to add JavaScript to a web page 25 JavaScript Code block Developed By: Saif Ullah Dar Usually Java Scripts are included within the head tag, it also could be included in the body tag. 11/22/2013
  • 26. Your First Code: Ex.1 <script> tag: Indicate that the text is part of a script 26 Developed By: Saif Ullah Dar 11/22/2013
  • 27. Your First Code: Ex.1 type attribute: Specifies the type of file and the scripting language use. 27 Developed By: Saif Ullah Dar 11/22/2013
  • 28. Code: Ex.1 <script> tag: Indicate that the text is part of a script type attribute: Specifies the type of file and the scripting language use. </script> End or Close Tag 28 Developed By: Saif Ullah Dar 11/22/2013
  • 29. Your First Code: Ex.1 A Method used to output a string onto the Browser 29 Developed By: Saif Ullah Dar 11/22/2013
  • 30. Your First Code: Ex.1 The string, that writeln method takes and printout on the browser. Whatever between the quotations mark will be printed as is. A Method used to output a string onto the Browser 30 Developed By: Saif Ullah Dar 11/22/2013
  • 31. Execute Ex.1: 31 Output Developed By: Saif Ullah Dar 11/22/2013
  • 32. Thank You Saif Ullah Dar 32 Developed By: Saif Ullah Dar 11/22/2013