HTML Online Tutorial Contents

Following are the posts for HTML online Tutorial. To learn everything about HTML, just read these posts: HTML Online Tutorial HTML TAGS (2) HTML BASICS (3) HTML ELEMENTS (4) HTML ATTRIBUTES (5) More »

XHTML

XHTML stands for Extensible Hypertext Markup Language. It is also known as XML (Extensible Markup Language). It is a markup language. In XHTML, there are no predefined tags. The user defines the More »

HTML SUMMARY

In this tutorial, you learned: HTML Introduction HTML Tags HTML Basics HTML Elements HTML Attributes HTML Paragraphs HTML Headings HTML Formats HTML Image HTML Links HTML Lists HTML Frames HTML Table After More »

HTML TABLES (13)

HTML Tables are used to arrange data in web pages. HTML allows the use of tables by <table>…</table> tags. Each row in HTML table is recognized by <tr>…</tr> tag. In each row More »

HTML FRAMES (12.2)

Nested frames example: For the following example to work, there are two other simple HTML files : “HMTL11e1 frame a.html” and “HMTL11e1 frame b.html”. your browser will divide your screeub half. The More »

 

Tag Archives: JAVASCRIPT

Learn how to use JavaScript Comments, JavaScript Literals and JavaScript Identifiers:

Learn how to use JavaScript Comments, JavaScript Literals and JavaScript Identifiers:

First we will introduce you to comments style of this language. Mostly the comments style is same in some languages. You don’t mix the comment styles of various languages, it is necessary for you to know about how to write comments in JavaScript.

JavaScript Comments:

There are two styles of comments which are supported by JavaScript. First style is the one in which any text that you may put in between // and the end of each line is considered as a comment by JavaScript. This style is also known as Single Line Comment. Therefore this text is ignored by JavaScript. In the second style any text between /* & */ will be considered as a comment and will be ignored as well. You can use this style to enter paragraphs of comments in the code. Following are some examples of JavaScript comments:

//This is a first style of comment

/* This is a second style of comment */

/*You can enter the paragraphs of comment like this in your code.

*This style can be used to provide introduction of your program

*Or this style can be used to explain each instruction in your code.

*/

JavaScript Literals:

Any data which will appear directly in a program is known as a Literal. For your understanding we have provided various examples which are:

“i am a literal”                // A string of text

1989                               //The number is 1989

true                                // A Boolean value

null                                 // shows an absence of an object

{2,5,7,8,9,1,5,7,5}          //This is a way to initialize an Array

JavaScript Identifiers:

The identifier is basically a name. The words which are used to name variables, functions and labels of loops in JavaScript are known as Identifiers. You must remember that the identifier must start with a letter, dollar sign ($) or an underscore (_). The succeeding characters can be digits, letters, dollar sign or even underscore. You must remember that digits cannot be used as a first character of identifier. This rule exists so that JavaScript can differentiate between numbers and identifiers. You should notice the following legal identifiers:

you

i_am_blog

exercise14

_what is an identifier

$your

To make the code editing easy and portability the ASCII characters are usually used as in identifiers. But what if you want to use a mathematical symbol as a variable! To solve this problem, you can use letters and digits from an entire Unicode set in identifiers. Due to this, you can also use variables names from non-English languages. Following is example of mathematical symbol identifier:

var π = 3.14;

var ∑ = 4.2;

In this post, you have learned about comments, literals and identifiers in JavaScript. To Learn more about JavaScript subscribe to our RSS feed and newsletter and you will be expert in JavaScript in no time.

To get a mobile app for your business visit www.codescamp.com

Book a free consultation today!

Understand the basics of JavaScript Lexical Structure or Syntax

Understand the basics of JavaScript Lexical Structure or Syntax

Today, you will learn in detail about the lexical structure of JavaScript. The lexical structure of any programming language means the set of rules that explains how to write code or program in that language. Therefore, for new programmers like you, learning the lexical structure of any programming language is the first step. Moreover, the Lexical structure is also known as Syntax of the programming language. Therefore, for simplicity we will use the term SYNTAX throughout the tutorial. The first thing you need to know is a character set.

JavaScript Character set:

The Unicode character set is used to write JavaScript programs. You should know that Unicode supports every programming language on this earth & it is a superset of ASCII and Latin 1.

JavaScript Case Sensitivity:

This language is a case sensitive. In other words, the JavaScript variables Moon, MOON, MoOn etc are all considered as a different variables and can have distinct values stored in them. Same is the case with functions names, keywords and identifiers as well.

Confusion between JavaScript, XHTML and HTML case sensitivity:

You should notice that the XHTML is case sensitive, But HTML is not case sensitive. Therefore, for you being a new programmer it can be a little bit confusing. Another reason for the confusion is that the HTML has close association with the client side JavaScript. But with practice you will understand. For example there are various client side JavaScript objects and HTML Tags have the same name. i.e. these names can be written in any case in HTML, but in JavaScript they have to be case sensitive.

For better understanding consider the event handler named onclick of HMTL. This is sometimes written as OnClick or onclick in HTML because it is case insensitive. But this same attribute must be written only as onclick in JavaScript.

Line Breaks and White spaces in JavaScript:

The line breaks means that the command that terminates the line in a code and moves to the start of next line. The white spaces are basically the blank spaces in between the words. All those spaces that appear between the tokens in the programs are ignored by JavaScript. It mostly ignores the line breaks in the code as well.  This is useful for you, because you can easily create a neat and consistent piece of code by formatting and indenting freely. In other words, you can use as many spaces and free lines you want in your code to make it readable.

JavaScript usually considers following as a whitespace characters:

  • Tab
  • vertical tab
  • form feed
  • non breaking space
  • byte order mark
  • any character in Unicode  group

JavaScript considers following as a Line breaks or terminators:

  • line feed
  • carriage return
  • line separator
  • paragraph separator

You need to remember that the line feed and carriage return are considered as a single line terminator

Format Control Characters:

These characters controls the presentation of the text they occur in. For example, RIGHT-TO-LEFT MARK &  LEFT-T-RIGHT MARK. These characters are significant for the presentation of non-English languages. You should remember that they are allowed in comments, expression literals and string literals. But they are not allowed in identifiers like name of variables etc. Except, the ZERO WIDTH JOINER & ZERO WIDTH NON JOINER are allowed in identifiers but not in the first character place.

So, in this post you learned about Case Sensitivity, white spaces, line breaks and format characters of JavaScript. To Learn more about JavaScript subscribe to our RSS feed and newsletter and you will be expert in JavaScript in no time.

To get a mobile app for your business visit www.codescamp.com

Book a free consultation today!

Learn about PHP and MySQL

Learn about PHP and MySQL relationship

PHP Introduction

PHP is basically a language which creates HTML content. Before starting this tutorial, you should have basic understanding of: HTML / XHTML, JavaScript. You can find the tutorial for HMTL here:

HTML online Tutorial Contents

 

We recommend that the reader should go through these tutorials first before PHP tutorial.

PHP stands for Hypertext Preprocessor. PHP can be used in three ways: Server side Scripting, Command Line scripting and Client-side GUI (Graphic User Interface) application. There are many databases which are supported by PHP e.g. MySQL, Solid, Informix , Sybase etc.). PHP is a free to download and use. Also, it is and open source software. PHP runs on various platforms like Windows, Unix and Linux etc. It runs efficiently on server side and is easy to learn. Following is the brief introduction of the ways in which PHP is used:

Server Side Scripting:

PHP is a server side scripting programming language like ASP. PHP is basically designed and best suited to create web content. PHP parser and a web server is used to generate the HTML. The web server is used to send the coded documents. PHP can also be used to generate the XHTML documents, graphics, animations, pdf files, etc.

Command Line Scripting:

The command line can be used to run PHP scripts like Perl, Unix Shell, or awk. These command line scripts can be used for various administration tasks of a system like log parsing or backup.

Client-Side GUI Application:

The cross platform GUI applications can be written by using PHP-GTK.

PHP File:

PHP files are capable of containing text, HTML, scripts and various tags etc. The extension of any PHP file is “.php”, “.php3” and “.phtml”. These files return to the internet browser as a plain HTML.

PHP and MySQL:

The database server is known as MySQL. It supports standard SQL. It is available freely to download and use. It is usually used for both small and large applications. It can compile various platforms.

If you need to develop a cross platform application i.e. develop it on Windows and serve on Linux then you can use PHP and MySQL together.

ASP online tutorial

ASP Server Side Scripting Online Tutorial Contents

Following is the ASP  Server Side Scripting Online Tutorial Contents:

ASP  Server Side Scripting
Learn about ASP Introduction in ASP tutorial (2)
Learn about Features of ASP, IIS and PWS (3)
Learn about Installation of IIS and PWS (4 ASP)
Learn about Installation of IIS on Windows Server 2003 and Testing your Web (5 ASP)
Learn about Basic ASP Syntax Rules (6 ASP)
Learn about Basic ASP Variables (7 ASP)
Learn about Basic ASP Procedures (8 ASP)
Learn about Basic ASP Forms and Inputs by User (9.1 ASP)
Learn about Basic ASP Forms and Inputs by User (9.2 ASP)
Learn about ASP Cookies (10 ASP)
Learn about ASP Session Objects (11.1 ASP)
Learn about ASP Session Objects (11.2 ASP)
6 asp

Learn about Basic ASP Syntax Rules (6 ASP):

This basic tutorial will include examples of ASP code, which will make learning ASP easy for you. To Practice either copy them or try to create similar codes on your own and then run them.

How to write an output to the Internet Browser:

Just like a HTML file, ASP file can contain HTML tags in it. The ASP file can also contain some Server Scripts in it which are enclosed in <% and %> known as delimiters.


These Server Scripts are included to be executed on the Server. They can contain expressions, procedures, statement and phrases which are valid for scripting languages you prefer to use.

Write Command:

The write command (response.write) is specifically used for writing an output to a browser. Following is an example which sends the “My first text” to the browser.

Example:

<html>

<body>

<% response.write(“My first text”)%>

</body>

</html>

There is another shorthand way to do this. This shorthand way is shown in following example:

Example:

<html>

<body>

<% =“My first text”%>

</body>

</html>

 

Using Scripts in ASP

VBScript:

Several Scripting Languages can also be used in ASP. But the default scripting language is VBScript. Following is an example which sends the “My first text” to the browser using VBScript:

Example:

<html>

<body>

<%

response.write(“My first text”)

%>

</body>

</html>

 

JAVA Script:

As JAVA Script is not the default scripting language, so you need to set it as a default at the top of a particular page in the language specification. Another important advice is: JavaScript is case sensitive, so write your ASP code with uppercase. You should only use lowercase when it is required by the language. Following is an example which sends the “My first text” to the browser using JAVA Script:

Example:

<%@ language=”JavaScript”%>

<html>

<body>

<%

response.write(“My first text”)

%>

</body>

</html>

 

Moreover the ASP is usually used with JavaScript and VBScript. But if your requirement is to use other scripting languages like PERL and REXX. Then you need to install their script engines separately.

 

For more visit next posts in this category.To go back to Contents of this tutorial: ASP Active Server Side Scripting Contents