Client-side dynamic behavior using Javascript

Here are some examples of client-side dynamic behavior using Javascript These are simple examples, and you should be able to read and modify them based on your experience in an introduction to programming class even if you have never seen Javascript. If you want to learn more, two good Javascript tutorials are W3 and Tizag (W3 has a more complete reference section, but both tutorials are easy to follow). If you want a quick reference on a statement or method, try a Google search. For example, if you want to see how to open a Window and see the argument definitions, search for window.open javascript.

People often copy and then perhaps modify Javascript from Web pages. There are also Javascript libraries, like this one.

The most common uses for Javascript are rollover effects on buttons and menus and verifying form data before it is submitted to a server.

The most complex, but increasingly common use of Javascript is in pre fetching data using XML requests while the user is idle or thinking. The so called AJAX (asynchronous Javascript and XML) applications behave more like applications that run on your desktop since information is automatically retrieved from the server. Google Maps is probably the best known AJAX example.


Disclaimer: The views and opinions expressed on unofficial pages of California State University, Dominguez Hills faculty, staff or students are strictly those of the page authors. The content of these pages has not been reviewed or approved by California State University, Dominguez Hills.