Home and Blog button

Pages

Introduction

Welcome To my Blog !!
This is a blog where you can get some knowledge that i have learned and been using. Sharing is gaining pals. So Happy Sharing and don't forget to follow and link my blog with yours! Thanks.
Happy Programming!!

Friday, September 4, 2009

Java Script: Introduction

JAVASCRIPT IN WEBPAGES


Today's web sites need to go much beyound HTML. There is definite need to allow users, browsing through a web site, to actually interact with the web site. The web site must be intelligent enough to accept users input and dynamically structure web page content, tailor made to the user's requirements.
Capturing usr requests is traditionally done via a FORM. Hence the web site development environment needs to have the facilities to create forms. After a form captures user input, the form must have a built in technique for sending the information captured back to the web server for processing. Processing user requests is generally done via scripts(small programs) that are based on the server.
The web site development environment should also provide facility for Validating user input. Invalid user input, will either cause data to be sent back from the web server to the browser from the web server. Neither of which would really attract repeat visits to the web site.
Hence, the web site development environmnet must also facilitate coding which runs in a browser at client side for data validation. Most development environments offer statnd constructs for data validation. Standard programming constructs are:
  • Condition checking constructs
  • Case checking constructs
  • Super controlled Loop constructs
JAVASCRIPT
Javascript is a scripting language (web site development environment) created by Netscape hence Javascript works best with the Netscape suite of Client and Server Products. It is also the default scripting language that Netscapte understands.
Client side javascript is traditionally embedded into standard HTML program. Javascript is embedded between the <script>...</script>
HTML tags. These tags are embedded within the <head>...</head> or <body>...</body> tags fo the HTML program.
Only a browser that is JavaScript enabled will be able to interpret JavaScript code.
Javascript is an object-oriented language that allows creation of Interactive Web Pages. JavaScript allows user entries, which are loaded into an HTML form to be processed as required. This empowers a web site to return site information according to a user's requests.
Advantages Of JavaScript
  1. JavaScript is an interpreted language, which requires no compilation steps. This provides an easy development process.
  2. JavaScript is embedded within HTML which does not require any special or separate editor for programs to be written, edited or compiled.
  3. Minimal syntax - Easy to learn
  4. Quick development due to no need for compilation.
  5. Designed for programming user events such as button, mouseover, oncilck etc.
  6. Easy Debugging and Testing
  7. Platform Independence / Architectural Neutral since it works with any machine which is javascript enabled.
Syntax:
<SCRIPT LANGUAGE="Javascript">
// Javascript code snippet written here
<SCRIPT>

No comments:

Post a Comment

Search This Blog