Troubleshooting

Which scripting language is the best to use?

There are places in any programming language where you can get into trouble if you are not careful. Every language has its pitfalls. Microsoft's JScript is no exception. Declaring variables in JScript is a particularly confusing area for anyone with experience in languages like Java, C, or C++. In JScript, variables can be declared more than once, with more than one value, and values of differing types. For example, var x could be assigned a string value in its first declaration and be re-declared as an integer later within the same script without causing trouble. This aspect of the language can take some getting used to.

Why won't my simplest scripts work?

Proper syntax is always a concern in programming. Consequently, it is important to pay strict attention to detail when writing scripts. If you mean for a particular parameter to be a string, for example, you will run into trouble if you forget to enclose it in quotation marks when you type it.

Is there a difference in where I put my scripts on the HTML page?

The scripts you write are interpreted as part of your Web browser's HTML parsing process. This means that if the script you create is located inside the <HEAD> tag in a document, it will be interpreted before any of the <BODY> tag is looked at. If you have objects that are created in the <BODY> tag, they don't exist at the instant the <HEAD> is being parsed and, therefore, can't be manipulated by the script.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset