Set - 2

Question 11 :

How to write a script for "Select" lists using javascript

Answer :

1. To remove an item from a list set it to null
mySelectObject.options[3] = null;
2. To truncate a list set its length to the maximum size you desire
mySelectObject.length = 2;
3. To delete all options in a select object set the length to 0.
mySelectObject.leng


Question 12 :

Text From Your Clipboard?

Answer :

It is true, text you last copied for pasting (copy & paste) can be stolen when you visit web sites using a combination of JavaScript and ASP (or PHP, or CGI) to write your possible sensitive data to a database on another server.


Question 13 :

What does the "Access is Denied" IE error mean?

Answer :

The "Access Denied" error in any browser is due to the following reason.
A javascript in one window or frame is tries to access another window or frame whose document's domain is different from the document containing the script.


Question 14 :

Is a javascript script faster than an ASP script?

Answer :

Yes.Since javascript is a client-side script it does require the web server's help for its
computation,so it is always faster than any server-side script like ASP,PHP,etc..


Question 15 :

Are Java and JavaScript the Same?

Answer :

No.java and javascript are two different languages.
Java is a powerful object - oriented programming language like C++,C whereas Javascript is a client-side scripting language with some limitations.