A step by step tutorial teaching you how to create your own chat client and chat server easily in C#, for local networks or the Internet.
A C# tutorial showing you how to make use of WMI to extract information on disk drives, such as model, capacity, sectors and serial number.
This tutorial will teach you how to calculate the shipping cost based on the weight, height, length and depth of the box, the distance and the UPS service type.
Creating a Rich Text Editor using JavaScript is easier to do than you might think, thanks to the support of modern browsers; this tutorial will walk you through it.
Starting a JavaScriptHow do you tell the browser that a script is starting? Moreover, how does he know what kind of script is starting? What if the browser doesn’t support JavaScript? |
On Monday, March 8th 2004 at 10:35 AM By Andrew Pociu (View Profile) ![]() ![]() ![]() ![]() (Rated 3.3 with 12 votes) |
||
|
Contextual Ads
More JavaScript Resources
Advertisement
This is another fragment from the book I started some time ago, named 'JavaScript class' Telling the browser JS is startingWe can’t tell the browser that a JavaScript is starting using some JavaScript code, because he doesn’t know, how to interpret it. We should tell the browser that a JavaScript code is starting that it says that another JavaScript is starting. That’s a paradox. Therefore, we must tell him using some usual code that all browsers can understand. That is HTML. We will use a HTML tag to tell the browser that JavaScript code is starting, and to send it to the JavaScript compiler implemented in the browser:
Language attributeYou saw in our script that we used an attribute that specified the language, and the language version: ‘language=”JavaScript1.5”’. We talked earlier in this book about JavaScript versions, and now we’re already applying the stuff we talked about. In the tag in which we are declaring that the script is starting, we can declare, as an attribute, the version that we use. If we specify an older version, for example JavaScript 1.3, the syntax will be checked as with an older interpreter, so if you use functions that are implemented in version 1.4 or earlier, the browser will most probably throw an error, even if it supports version 1.5. Anyway, you’ll probably use the most recent version in your scripts, 1.5. Pay attention if you want to use the first version of JavaScript, you must not write:
Hidding JS from older browsersYes, this is about compatibility again. In the first days of JavaScript, when not all browsers had built-in support for understanding JavaScript, this code was very important. Now, because most of the browsers support JavaScript, and when I say most, I mean nearly every browser, you can safely discontinue using this improvised code. Let’s see how we can hide JS from old versions of browsers:
Script skeletonHere’s a very very very simple JavaScript script:
I call it very very very simple because it does nothing! Actually, this is just the skeleton that you must use every time you will write your script, except the comments, which we discussed earlier that are optional. You can write your script in an editor but it will do nothing. |
|||
Digg It!
Del.icio.us
Reddit
StumbleIt
Newsvine
Furl
BlinkList
|
|||
|
|||
Current Commentsi AM LOOKING ON WRITING SOME JAVASCRIPT BUT NEED A HELPING HAND IN THE RIGHT DIRECTION CAN YOU HELP?
OK, you can post on the forums or contact me by email.
your samples are just very simple, i need some difficults like accessing to the database..k? hop u wll.
Accessing a database using JavaScript? ... I don't think so :) Maybe you want JSP (Java Server Page) or try PHP.
Read this: <a href-"http://www.webreference.com/programming/javascript/j_s/column9/" target="_blank">http://www.webreference.com/programming/javascript/j_s/column9/</a>
gv
Hi! That\'s ok...But i\'am looking for new development tols in php programming and data base development by using MYSQL
hi im starting with java i dont know anyhting about it so if anybody that can help me n take time to help me or sen dme the codes i would be more then happy thnk u gefhf@yahoo.com email me if u can help me !
Hi....I am looking the the use of javascript in my project. I need to ise the javascript to control the subjects direction. For example I want the subject turn left or right when it meet the conditions.
Can u help? Thanks
Related Tutorials
Related Source Code
JavaScript Job Search