Questions about JavaScript - the Scripting Language used for Web development.

2,338 Questions
Computer Programming
C Programming

Write a c program to print factorial?

hope you like the answers

Computer Monitors
Windows XP

How do you adjust screen resolution?

Right click on desktop and select properties. Go to the settings tab and there you will find the screen resolution tab. You can scroll the tab to set the appropriate screen resolution.

Adjusting Screen ResolutionSTART - Settings - Control Panel - Display. Click on the "Settings" tab. On the lower right corner there is a slide bar called "Size Area". Slide the bar to the size you want. If icons are too big, slide the bar to the right. Click "Apply" and a message will pop up and click "OK". The screen will resize and ask you if you want to keep it. Click "Yes" if you want to or no if you want another size. After you are happy with the correct size, click "OK" to close the Display settings. Done.

Here are more answers from other Wiki s contributors:

  • To change the screen resolution all you have to do is right-click on your desktop and click properties. When the window comes up, click the tab labelled Settings. You can change screen resolution and color settings there.

Right click on the desktop, click properties, then go to the settings tab. From there you will see a thing that you can drag to make your monitor show different resolutions.


How do you install HTML5 on your iPad?

HTML 5 is a set of standard instructions that a modern browser should be able to use when rendering content from a website. The iPad's Safari browser uses the HTML 5 standards so there is nothing to install.


How do you call stored procedure using JS?

hi, I don't know the correct answer but I referred some sites to answer ur question.Most of them are talking with ADODB connection. here i have some links that i referred : go through them. u may get some idea from those sites. with regards, Angai. Some Example Code : Dim oConnection, oRecordset

Set oConnection = Server.CreateObject("ADODB.Connection")

oConnection.Open "IntranetSQL"

Set oRecordset = oConnection.Execute("SELECT * FROM Employees")

Response.write(activewidgets_grid("obj", oRecordset))

'Alternate method via recordset

'do while not oRecordset.eof

'str = str & oRecordset("FirstName") & "," & oRecordset("LastName") & vbCrlf




Set oRecordset = nothing


Set oConnection = nothing one more link is here to connect to Microsoft Acces: (tutorial link)

Java Programming

How do you validate multiple check box in java script?

You can use this logic or a logic similar :

For Example:

function validate()


var arrayOfcheckBoxes = document.getElementsByName('checkBoxes[]');

var selectedBoxes = 0;

for (var i = 0; i < arrayOfcheckBoxes.length; i++)


if (arrayOfcheckBoxes[i].checked)


selectedBoxes ++;



Web Programming

OR syntax in javascript?



if (x >= 10 y >= 10) { //dostuff }


AND: &&

greater than: >

greater than or equals to: >=

less than: <

less than or equal to: <=


NOT: !


Who were the creators of java script?

Brendan Eich of the Netscape group created Javascript. Here is a summary of his life:

His early life
  • Born in 1961 in Pittsburgh, Pennsylvania
  • Received his bachelor's degree in math and computer science at Santa Clara University in 1983.
  • Received his master's degree in 1986 from the University of Illinois at Urbana-Champaign in 1986.
His work
  • From 1985-92 he worked as a computer programmer at Silicon Graphics where he focused on operating system and network code.
  • From 1992-95 he worked at MicroUnity Systems Engineering, writing microkernel and DSP (Digital signal processor) code.
  • From 1995-2003 he worked as a Netscape Computer Programmer. He worked on JavaScript(originally called Mocha, then called LiveScript) for the Netscape Navigator web browser.
  • In 2003 he co-founded the Mozilla Foundation and now works there as the Chief Technology Officer.
  • Brendan Eich is now in his early 50's.

Information obtained from Wikipedia and (Not copied and pasted). See related links for links to these articles.

PHP Programming

How does form validation differ in JavaScript and PHP?

In JavaScript the validation is done client side, which means it can be easily bypassed by turning JavaScript off in your browser. But with PHP it is server side, which means you can't switch it off, so you can't bypass the validation.

Web Design and Publishing

How do you create drop down menus with mouse events using JavaScript?

That would be very complicated to write yourself. Use a prewritten script: But Javascript dropdown menus and flash menus are really annoying. They are inefficient. They won't work for users of text-only browsers, cell phone browsers, or aural browsers (text-to-speach browsers used by blind people). They aren't search engine friendly. They don't match standards for the GUI of the client's OS. Just don't use them. -DJ Craig Javascript is usually used with html(hyper-text markup lang.). type: onmouseover(:dropdown=true:)onmouseout(:dropdown=false:)

*** Another solution would to use a powerful javascript plugin called "jQuery". It's a free resource, and allows you to do incredible things with JavaScript with very little code or experiance. For instance, to create a simple dropdown menu, you would just give an element an ID that you want to use.. for instance <a id="menuPop" href="#">PopMeDown!</a>, with another hidden DIV that is position absolutle below the anchor that has an id like <div id="popMeDown" style="display: none;">Stuff In Menu Here</div>.

And then your jQuery would be this simple: $('#menuPop').bind('mouseenter', function(e){



$('#menuPop').bind('mouseleave', function(e){



It's super easy to create things like this with jQuery, check this out:

- Caleb Convina Web Design and Hosting

Computer Programming

What is ECMAScript?

ECMAScript is a programming language adopted by the European Computer Manufacturer's Association as a standard for performing computations in Web applications. The ECMAScript language includes structured, dynamic, functional, and prototype-based features.

Web Design and Publishing
Web Programming

What are client side and server side scripting?

Client side scripting is a script, (ex. Javascript, VB script), that is executed by the browser (i.e. Firefox, Internet Explorer, Safari, Opera, etc.) that resides at the user computer.

Server side scripting, (ex. ASP.Net, ASP, JSP, PHP, Ruby, or others), is executed by the server (Web Server), and the page that is sent to the browser is produced by the serve-side scripting.

So when a server sends out a page, it executes server-side scripts, but does not execute client-side scripts. Once the browser receives the page, it executes the client-side scripts.

Server side scripting can connect to databases that reside on the web server or another server reachable from web server. Client side scripting cannot do that.

Server side scripting can access the file system that reside at the web server, client side cannot.

Server side scripting can access settings belong to Web server while client side cannot.

Client side scripting can access files and settings that are local at the user computer.

Client side scripting consumes cycles from user's computer not web server one, while server side scripting consumes cycles form web server one.

Database Programming

What is todays kalyn matka number?

11...panna is 290

Business Plans
Marketing Advertising and Sales

What are the various approaches of advertising?

Once a company decides what type of specific advertising campaign it wants to use, it must decide what approach should carry the message. A company must decide on such items as frequency, media impact, media timing, and reach.

Roman Numerals
BP Oil Spill
How To

How to use Javascript to write to the local filesystem?

For security reasons, regular JavaScript scripts in web pages are not allowed to write to the local file system.


What does confirm password mean?

It means: ''Re-write password''

Java Programming
The Difference Between

What are the differences between java and JavaScript?

There's a world of difference between the two. Javascript is used for front-end web development while Java can only be used as a back-end language within a web environment. Java doesn't need a web browser to compile and execute like Javascript does. Java is compiled prior to runtime while Javascript is compiled at runtime. The syntax/reserved-words are also different. There's many more differences if you go and do some research on the two languages.

Following are some points which differentiates java & javascript

  1. Java follows strong type checking where as Javascript is very flexible in datatype(loosly typed). Supports types which represents boolean,int,string
    • Ex : Variables in Java is declared as datatype ; --> int num;

    • But in Javascript variable declaration will be as var ; --> var myName;

  2. Javascript support function declarations, but without accessibility specifiers,parameter datatype,return type
  • Javascript : function fcnName(str)

........function body..........

  • Java : public int functionName(int no)

..........function body.........

will continue with answer...........
Java is a programming language designed to run in a Java Virtual Machine which is itself a program that allows java programs to run on any computer/device a Java Virtual Machine has been programmed for.

Java script is a scripting language that runs inside of a internet browser to enhance the web experience. Java script is designed to expand the capabilities of a web page so that it behaves more like a program on the computer than just a static page of text and images.

Web Browsers

Insert date on a webpage using javascript?

Just use new Date(); to get the current date and then use document.getElementById to insert it on the webpage.

<div id="example"></div>

<script type="text/javascript">

document.getElementById('example') = new Date();


Java Programming
iPhone 3GS

How do you synchronize java?

Synchronizaion is the process by which only one Thread can access an object at a time,until and unless thread releases it's lock no other thread can acess the object. there are two forms of syncronization method and statement.

to make a method synchronized just add the keyword synchronized to the signature ie: public synchronized void increment() {



to create syncrhonized statements are like this:

synchronized(this) {

lastName = name;



note: constructors can not be syncronized

Java Programming
iPhone 3GS

What is hashing in Java?

Creating a Integer out of an object is called hashing. Hashing is commonly used in HashTable, HashMaps and HashSet.

For instance you have




Hashing on each value would generate something like

123455 Alex

123344 John

123987 Peter

when put in hashtable or hashset would be quicker to find each piece of information.

There are many algorithms available with java to get the hash of an object.

Software Engineering

Definition of web technology?

The techniques or technologies used for web development


Can you use a javascript document offline and if so how?

Javascript is embedded into HTML pages, so yes. You can create an HTML document on your desktop and include javascript within. Once you save the file, you can open it with the web browser that makes you happiest and test your javascript code, all while being offline. Then only note here is you will not be able to test any postbacks.

The Difference Between

What are the differences between JavaScript and Ajax?

Javascript is a scripting language used to program various actions to be executed by the web browser. It can be used for more than just AJAX.

AJAX involves using Javascript and other client-side and server-side technologies to provide seamless user experience, such as some element of the page being updated without entire page being reloaded from the server.

AnswerAJAX is a part of Javascript programming. Javascript is just a client-side scripting language that is used to control a web page once a user has downloaded the page. AJAX is a particular usage of Javascript in which javascript communicates with the remote script and receives the response from the server, without having to reload the whole page. AnswerJavascript is a client-side scripting programming language... AJAX is a technique incorporating the use of Javascript, a server-side scripting language, and XML. But javascript is the main core of ajax-based systems. AJAX stands for Asynchronous Javascript and XML. AnswerAJAX :

Ajax is the acronym for Asynchronous JavaScript and XML. It incorporates a suite of technologies aimed at improving user experience with web pages. It also allows programs written in different programming languages on different browsers to communicate with each other. Translation, communication and function between web applications happens remotely and, ideally, instantaneously. Another primary aim of Ajax is to reduce user delay when interacting with web pages. Ajax frameworks and technological components allow web applications to function on an as-need basis without requiring the re-loading of the entire web page.


Javascript, on the other hand, is a client side scripting language that allows the creation of dynamic web pages providing a new level of interactivity. The advantage of JavaScript is that since it's a client side application, it can create dynamic web pages that are more complex than what a server side script can do. Server side scripts are run by the host machine and thus, has very limited resources especially when there are a lot of people accessing that server. Being on the client computer, Javascript has a lot of resources to play regardless of the activity on the server.

The prime drawback of Javascript is that it is a very good candidate for a Trojan to be installed into your computer. Because it runs on the client, it is authorized some resources that could potentially give control of your computer to an outsider, potentially getting you included in a botnet. The remedy to this drawback is by not allowing untrusted javascript codes from being run on your computer.

Java Programming

How would you write a program that counts the number of vowels in a string?

A simple way to do this, whatever the language used, is to step through the characters in the string one by one and compare them with a previously established set of vowels, adding one to a count value every time a character matches one of the vowels. The count value at the end will be the number of vowels.

Remember to define the set of vowels and the count value and to check for an empty string and for the end of the string.

Here are some examples of programs that count the number of vowels in a string in different programming languages. C++ Example 1void main() {char *str; char a[]="aeiouAEIOU"; int i,j,count=0; clrscr(); printf("\nEnter the string\n"); gets(str); for(i=0;str[i]!='\0';i++) { for(j=0;a[j]!='\0';j++) if(a[j] == str[i] { count++; break;


printf("\nNo. of vowels = %d",count); getch();


} C++ Example 2#include


int main (void) {char s[100];

int i,c=0;


printf("\n Enter a string");

scanf("%s",s); for(i=0;s[i]!='\0';i++)


if (s[i]=='a's[i]=='A's[i]=='e's[i]=='E's[i]=='i's[i]=='I's[i]=='o's[i]=='O's[i]=='u's[i]=='U') { c++;



printf("\nThe no. of vowels in the given string is=%d",c);


return 0;


} Javascript Exampleb = prompt("Enter the String","");


for (i=0;i<b.length;i++) {if ("aeiou".indexOf(b.substr(i,1).toLowerCase())!=-1){ c++;



alert("No. of Vowels: "+c); PHP Example$vowels = array('a','e','i','o','u');

$string = 'An example string';

$length = strlen($string);

$count = 0;

for ($i = 0; $i !== $length; $i++;) {if (array_search($length[$i], $vowels)) { $count++;



echo 'There are (' . $count . ') vowels in the string (' . $string . ').';

Another way to do this would be through the use of RegExes/Pattern matching

Javascript Example:

str="A string for use of testing";

count= str.match(/[aeiou]/gi).length;

console.log("There are "+count+" vowels");

Java Example:

import java.util.regex.*;

public static void main(String[] args){

String str= "A string for use of testing";

Matcher m= Pattern.compile("(?i)[aeiou]").matcher(str);

int count= 0;

while (m.find()){

count+= m.end()-m.start();


System.out.println("There are "+count+" vowels");


Java Programming

What is meant by API in Java?

An application programming interface (API) is a library of functions that Java provides for programmers for common tasks like file transfer, networking, and data structures.

Web Programming

What does HTML stand for and what is it used for?

HTML stands for hyper-text markup language and is a popular language to create websites with. Think of HTML as another language, just like English or Spanish, which tells the computer how to show and render the website you created.

Although there are alot of other languages the computer understands, most people use HTML since it is more popular (think of the popularity of the English language around the world).


Copyright © 2020 Multiply Media, LLC. All Rights Reserved. The material on this site can not be reproduced, distributed, transmitted, cached or otherwise used, except with prior written permission of Multiply.