![]() |
|
#1
|
||||
|
||||
An Introduction to JavascriptFor those of you who are interested in learning Javascript, I have decided to write some short tutorials here at GIDForums. I have written a few Javascript applications, over the past couple years, and have learned that Javascript is not much harder to learn than PHP. There was a day, not long ago, when Javascript was as much a mystery to me as PHP. One thing I could not understand was how Javascript ran - was it run from the server or from the browser? Later, I came to understand that Javascript is a language that runs on the browser of the user visiting the web page. I have also read that Javascript may run on the server-side, in order to do server-side operations, but its use is very limited and almost non-existent, and only Microsoft is continuing to develop their own version of Javascript called, Jscript, to run on servers.
Since Javascript is typically for use on browsers, one may ask, "Is Javascript compatible with all browsers?". Generally, it is, but just as web designers using CSS have problems with browser compatibility issues, the same applies to programmers using Javascript. In fact, not only are their compatibility issues among the browsers, but also versions of each browser, such as between IE 5+ and 6+. For this reason, many web programmers may have dabbled with Javascript a bit, to get some additional functionality on their websites, only to end up taking the Javascript code off, because it only worked with MS Internet Explorer 6.0, and 10-20% of the visitors used other types of browsers (i.e. Mozilla or Firefox). With some tinkering and research, most Javascript functions can be modified to work with a majority of the browsers available. The following is an example of how Javascript code looks, as I have written an example function within some HTML script tags: Code:
In order to use this function, it should be placed in the header of your HTML page. Using an HTML button and its OnClick action, the following code demonstrates how to call our Javascript function: HTML Code:
This initial post is meant only to spark some interest in Javascript. I intend to provide some additional examples of using Javascript to create some dazzling web effects, such as a pop-up calendar, and auto-filling form fields. As I continue with this tutorials, I am sure that others will contribute with their comments and Javascript code or experiences and we will all benefit from sharing each others knowledge on this language. |
|
#2
|
||||
|
||||
|
Always love to read tutorials, especially as I'm getting back into web design (haven't made a page in 5 years).
HTML Goodies also has a Javascript primer, plus other web design info. __________________
Common Sense v2.0-Striving to make the world a little bit smarter. |
|
#3
|
||||
|
||||
|
CrystalLattice,
Great to see you here! Before this year, I hadn't done a web page of my own in several years. In one of my next posts, I will be posting some Javascript resources, as there are a multitude of them that are very helpful. Eventually, GIDForums will be a resource in itself, as more Javascript is posted here, and a seperate forum is dedicated to it. |
Recent GIDBlog
Halfway done! by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| We're looking for JavaScript codes / mini tutorials. | JdS | Web Design Forum | 7 | 31-Mar-2008 23:25 |
| javascript menu | dopee | Web Design Forum | 7 | 30-Jul-2004 23:22 |
| JavaScript Tutorial Part 1 | pcxgamer | Web Design Forum | 2 | 01-Dec-2003 09:16 |
| This JavaScript doesn't work on Mozilla. | JdS | Web Design Forum | 8 | 02-Jul-2003 14:08 |
| Why does javascript cause sound problem to website | rhino1616 | Web Design Forum | 8 | 06-May-2003 16:25 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The