Showing posts with label JAVA-SCRIPT. Show all posts
Showing posts with label JAVA-SCRIPT. Show all posts

Wednesday, 22 February 2012

Reload page using jquery

Include jQuery library file:
<script type="text/javascript" src="jquery-1.6.1.min.js"></script>

Assign the event on button click for relod the page

<script type="text/javascript">
        $(document).ready(function() {
            $('#Button1').click(function() {

Sunday, 23 October 2011


JavaScript is normally found embedded in HTML code. That is because JavaScript is run by the client computer's browser. JavaScript is supported by all internet browsers and was standardized by the European Computer Manufacturers Association (ECMA). It was standardized under the name ECMAScript and it is vendor-neutral standard. Visual Basic Script (VBScript) on the other hand is a Microsoft supported language. When a person is surfing the web, they click on a link which will cause the browser to make a request for a specific HTML page or other type of file from a web server (HTTP server). These servers contain pages that are sent to the client using the HTTP protocol normally serviced on port 80. The HTML page may contain JavaScript which is run by the browser when the HTML page or other type of file is loaded.-----------------------------------------------------------------The key to a quick understanding of JavaScript lies in the structure of its objects. JavaScript is an object oriented language. Variables are declared before use but they are not explicitly typecast. The variable type is normally determined by its use. The ability to do anything in a programming language requires functions supported by the language. JavaScript contains a few functions that are not part of objects. These functions are generally for variable type conversion to a specific type along with support of some dialog boxes. The rest of the functionality of JavaScript is contained in its objects. The objects contain:
Methods (Functions) Parameters (Data or Other objects) - Describe characteristics of the object Events - Events are tied to objects JavaScript has basically three types of objects which are:
Top level objects Objects that are properties of other objects. (What I call sub objects) Objects that are not properties of other objects (What I call independent objeects) ---------------------------------------------------------------------------------------JavaScript objects do not have the normal class to subclass relationship, but are contained within one another and they do not inherit properties from each other. JavaScript is a tool to allow manipulation of objects that are already created by the computer system such as "navigator" to access browser characteristics.
Syntax Statements may contain a semicolon at the end , but it is not necessary unless there are multiple statements on one line. Multiple statements on one line must be separated by a semicolon. JavaScript is case sensitive. Quotes may be single quote (') or double quote ("). When embedded within each other they must be used consistently as in the following example.onMouseOver="window.status='To Operating Systems Section' ;return true" Comments are the same as in C++ with the "//" characters for a single line comment, and the "/*" for the beginning of a multiline comment and the "*/" for the end of a multiline comment. Variables must be defined before they are used.