Thursday, January 8, 2009

Java script:

Java script is client-side scripting language that allows you to write scripts, or small non-compiled programs, that are run by browser.

What can be achieved using java script?
1. Move objects around the web page.
2. Show or hide elements.
3. Create lists that expand or contract when you select an item.
4. Dynamically alter the color and size of web content.
5. Provide the drag-drop functionality similar to that used by modern graphican operating system.

Dynamic HTML is combination o three key technologies:
1. HTML
2. Style sheets
3. Scripting

Scripting can be divided into two parts:
Client side scripting: VBScript, JavaScript, AJAX
Server side scripting: JSP, PHP, ASP, Cgi-bin

To make the whole model distributed, some other standards are used. Some of them are complementary and others are alternatives.
1. Java RMI
2. CORBA
3. SOAP
4. XML-RMC
5. WSDL/WSDD
6. UDDI

To learn about all this basic knowledge of web services, Java and XML are prerequisites.

Now we'll discuss JavaScript in somewhat more details.
It can be integrated with HTML code in following ways.
1. Include inline scripts in response to intrinsic events.
2. Put scripts in the document head or body.
3. Link to external scripts.

To let browser know about scripting language, we need to explicitly mention this in meta tag.


This ensures that the browser knows that we are using JavaScript unless told otherwise.

some random points:
For navigator DOM model
All object under DOM is stored in an array..
For example all image objects are stored in the document.images property.

In case of explorer DOM model
All objects are contained in document.all object.
Also some syntax are changed with respect to Netscape but concept is same.

Handling Events:
coding for event handling is difficult for navigator but straightforward in case of Explorer as explorer does a bubble up approach such that event first is detected by element that generated that like div or image element and moves up the document object chain until handled or cancelled.


No comments:

Post a Comment