Active Browser Web Page:
• An active web page is a web page where the browser performs the logic instead of
web server. For Example when you have got a page where you’re showing share
prices, and you update that page after each 5 seconds. There is a solution to
update result of that web page without reloading or refreshing the webpage.
• It can be possible by using AJAX with JavaScript. In contrast to PHP your
browser is able to execute JavaScript, so it is happening without reloading the
webpage.
• By using Active Web Page everything is happening inside the webpage and there
is no need to update or refresh or reload the webpage.
• For Example active users on FB are updated automatically using Active Browser
Web Page techniques.
JavaScript:
JavaScript is used in millions of Web pages to improve the design, validate forms, detect
browsers, create cookies, and much more.
JavaScript is the most popular scripting language on the internet, and works in all major
browsers, such as Internet Explorer, Mozilla, Firefox, Netscape, Opera.
Java Script is a client-side language.
It can convert your static HTML page into the Dynamic page.
It works on all major browsers.
It has many more libraries to make your work more easier.
What JS can Do?
It can totally change our complete HTML webpage with new elements and contents.
It can add dynamics to our webpage such as animation.
It can add user interface in our webpage such as get name from prompt box and show it
with the user given name.
JavaScript can validate form before submitting.
It apply restrictions on each field of your webpage form before submitting.
Requirements:
Basic knowledge of CSS and HTML is must before making a webpage that includes JS.
A notepad to write JS code such as Notepad++ and Dreamviewer.
And also a browsers to check its output.
Types of JS:
Internal JS
External JS
Internal JS:
A type of JS in which user writes code inside the HTML body webpage.
Internal JS is used for short scripts.
Syntax:
<script>
document.write(“Hello World”);
</script>
External JS:
A type of JS in which user write all JS code in another or separate file is called External
JS.
In External JS there is no need to write code in HTML body.
The code of JS is written in separate files and save with .js extension.
And then linked to the HTML head tag by using source of file.
It separates HTML and JS code.
It makes HTML and JS easier to read and maintain usually when there is a very long or
lengthy project.
Cached Java Script files can speed up page loads.
Syntax:
<script src=’link of .js file’></script>
Data Type of JS:
String
Integer
Boolean
Arrays
String:
Strings are the values made up of text and can contain letters, numbers, symbols,
punctuation and even emoji. Strings are written in JS insede in double quotation or single
quotation.
Integers/Numbers:
Numbers are the values that can be used in mathematical operations.
There is no need to write integers by using some syntax or rule you can easily write
integers without single or double quotation.
Boolean:
Boolean are the values that have only two situation, either it is true or false, right or
wrong, yes or no.
Arrays:
JS Operators:
Operators are the symbols that are used between different values such as addition,
subtraction, multiplication and division.
Types of JS Operators:
1. Arithmetic Operator
2. Assignment Operator
3. Comparison Operator
4. Logical Operator
Arithmetic Operator:
That are used to perform arithmetic operations are called arithmetic operator. Such as
+,-,*, /, %.
Assignment Operator:
That are used to assign a value to a variable is called assignment operator such as ==, +=.
-=, *= and /=.
Comparison Operator:
Operators that are used to make comparison between two or more values is called
Comparison Operator. Such as >, <, !=, >= and <=.
Logical Operator:
Operators that are used to make logic between two or more values is called Logical
Operators. Such as &&, || and !.
JS Variables:
► Variables are used to store data.
► A variable is a "container" for information you want to store. A variable's value
can change during the script. You can refer to a variable by name to see its value
or to change its value.
► Rules for variable names:
 Variable names are case sensitive
 They must begin with a letter or the underscore character
► strname – STRNAME (not same)
JS PopUp Boxes:
Alert Box:
 An alert box is often used if you want to make sure information comes
through to the user.
 When an alert box pops up, the user will have to click "OK" to proceed.
<script>
alert("Hello World!")
</script>
Confirm Box:
 A confirm box is often used if you want that the user should verify or
accept something.
 When a confirm box pops up, the user will have to click either "OK" or
"Cancel" to proceed.
 If the user clicks "OK", the box returns true. If the user clicks "Cancel",
the box returns false.
Prompt Box:
 A prompt box is often used if you want that the user should input a value
before entering a page.
 When a prompt box pops up, the user will have to click either "OK" or
"Cancel" to proceed after entering an input value.
 If the user clicks "OK“, the box returns the input value. If the user clicks
"Cancel“, the box returns null.
 <script> name= prompt(“Enter Name”,’name”);
document.write(name);</script>
Conditional Statement:
Statements that are used to make a choice between two or more statements are called
Conditional Statements. Such as If, If__Else, If__Else__If and Switch statement.

Active browser web page

  • 1.
    Active Browser WebPage: • An active web page is a web page where the browser performs the logic instead of web server. For Example when you have got a page where you’re showing share prices, and you update that page after each 5 seconds. There is a solution to update result of that web page without reloading or refreshing the webpage. • It can be possible by using AJAX with JavaScript. In contrast to PHP your browser is able to execute JavaScript, so it is happening without reloading the webpage. • By using Active Web Page everything is happening inside the webpage and there is no need to update or refresh or reload the webpage. • For Example active users on FB are updated automatically using Active Browser Web Page techniques. JavaScript: JavaScript is used in millions of Web pages to improve the design, validate forms, detect browsers, create cookies, and much more. JavaScript is the most popular scripting language on the internet, and works in all major browsers, such as Internet Explorer, Mozilla, Firefox, Netscape, Opera. Java Script is a client-side language. It can convert your static HTML page into the Dynamic page. It works on all major browsers. It has many more libraries to make your work more easier. What JS can Do? It can totally change our complete HTML webpage with new elements and contents. It can add dynamics to our webpage such as animation. It can add user interface in our webpage such as get name from prompt box and show it with the user given name. JavaScript can validate form before submitting. It apply restrictions on each field of your webpage form before submitting. Requirements: Basic knowledge of CSS and HTML is must before making a webpage that includes JS. A notepad to write JS code such as Notepad++ and Dreamviewer. And also a browsers to check its output. Types of JS: Internal JS External JS Internal JS: A type of JS in which user writes code inside the HTML body webpage. Internal JS is used for short scripts. Syntax: <script> document.write(“Hello World”); </script> External JS: A type of JS in which user write all JS code in another or separate file is called External JS. In External JS there is no need to write code in HTML body.
  • 2.
    The code ofJS is written in separate files and save with .js extension. And then linked to the HTML head tag by using source of file. It separates HTML and JS code. It makes HTML and JS easier to read and maintain usually when there is a very long or lengthy project. Cached Java Script files can speed up page loads. Syntax: <script src=’link of .js file’></script> Data Type of JS: String Integer Boolean Arrays String: Strings are the values made up of text and can contain letters, numbers, symbols, punctuation and even emoji. Strings are written in JS insede in double quotation or single quotation. Integers/Numbers: Numbers are the values that can be used in mathematical operations. There is no need to write integers by using some syntax or rule you can easily write integers without single or double quotation. Boolean: Boolean are the values that have only two situation, either it is true or false, right or wrong, yes or no. Arrays: JS Operators: Operators are the symbols that are used between different values such as addition, subtraction, multiplication and division. Types of JS Operators: 1. Arithmetic Operator 2. Assignment Operator 3. Comparison Operator 4. Logical Operator Arithmetic Operator: That are used to perform arithmetic operations are called arithmetic operator. Such as +,-,*, /, %. Assignment Operator: That are used to assign a value to a variable is called assignment operator such as ==, +=. -=, *= and /=. Comparison Operator: Operators that are used to make comparison between two or more values is called Comparison Operator. Such as >, <, !=, >= and <=. Logical Operator:
  • 3.
    Operators that areused to make logic between two or more values is called Logical Operators. Such as &&, || and !. JS Variables: ► Variables are used to store data. ► A variable is a "container" for information you want to store. A variable's value can change during the script. You can refer to a variable by name to see its value or to change its value. ► Rules for variable names:  Variable names are case sensitive  They must begin with a letter or the underscore character ► strname – STRNAME (not same) JS PopUp Boxes: Alert Box:  An alert box is often used if you want to make sure information comes through to the user.  When an alert box pops up, the user will have to click "OK" to proceed. <script> alert("Hello World!") </script> Confirm Box:  A confirm box is often used if you want that the user should verify or accept something.  When a confirm box pops up, the user will have to click either "OK" or "Cancel" to proceed.  If the user clicks "OK", the box returns true. If the user clicks "Cancel", the box returns false. Prompt Box:  A prompt box is often used if you want that the user should input a value before entering a page.  When a prompt box pops up, the user will have to click either "OK" or "Cancel" to proceed after entering an input value.  If the user clicks "OK“, the box returns the input value. If the user clicks "Cancel“, the box returns null.  <script> name= prompt(“Enter Name”,’name”); document.write(name);</script> Conditional Statement: Statements that are used to make a choice between two or more statements are called Conditional Statements. Such as If, If__Else, If__Else__If and Switch statement.