|
What is 1000Projects
'1000projects.com' is an educational content website dedicated to finding and realizing Final Year Projects, IEEE Projects, Engineering Projects, Science Fair Projects, Project Topics, Project Ideas, Major Projects, Mini Projects, Paper Presentations, Presentation Topics, IEEE Topics, .Net Projects, Java Projects, PHP Projects, VB Projects, SQL Projects, C & DS Projects, C++ Projects, Perl Projects, ASP Projects, Delphi Projects, HTML Projects, Cold Fusion Projects, Java Script Projects, Btech Projects, BE Projects, MCA Projects, Mtech Projects, MBA Projects, Project on Software, CBSE Projects, Testing Projects, Embedded Projects, Chemistry Projects, Electronics Projects, Electrical Projects, Science Projects, Mechanical Projects, Mba project Reports, Placement papers, Sample Resumes, Entrance Exams, Technical Faq's, Puzzles, etc
how it works?
Everything on this site is submitted by the students in this professional community. You Can submit your Projects, Project Topics & Ideas to info.1000projects{at}gmail.com after you submit your project/project Idea/Abstract/Seminar Topics, These are being verified and approved by our administrator. after approval of this project/project Idea/Abstract/Seminar Topics, It can be shown on 1000projects.com so that other users can read/discuss it.The entire content on this website is Only For Educational Purpose, Non Commercial use!
Please help us/Other Users by sending projects/project Ideas/Abstracts/Seminar Topics. Thanking You!!!!!
Category Articles
What does the "Access is Denied" IE error mean?
Added on Thu, Jan 7, 2010
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. Read More
How do you submit a form using Javascript?
Added on Thu, Jan 7, 2010
Use document. forms[0].submit(); (0 refers to the index of the form ? if you have more than one form in a page, then the first one has the index 0, second has index 1 and so on). Read More
What is a prompt box?
Added on Thu, Jan 7, 2010
A prompt box allows the user to enter input by providing a text box. Read More
How can we hide HTML source code from users? This website is created with Java Script language.
Added on Thu, Jan 7, 2010
put the HTML in a <div id="theDiv"> tag call the javascript function in any event like (onLoad ,onClick etc) document.getElementById("theDiv").style.vibility=hidden; Read More
How to read and write a file using javascript?
Added on Thu, Jan 7, 2010
In order to detect the operating system on the client machine, the navigator.appVersion<br>string (property) should be used. Read More
What is the main difference between Client side Java Script and and Server side Java Script how actully they run on both side with Example
Added on Thu, Jan 7, 2010
Clientside Javascript encompasses the core language plus extras such as the predefined objects, only relevant to running Javasript in a browser.The clientside javascript is embedded directly in the HTML pages and is interpreted by the browser... Read More
How to make a array as a stack using JavaScript?
Added on Thu, Jan 7, 2010
The pop() and push() functions turn a harmless array into a stack <script type="text/javascript"> var numbers = ["one", "two", "three", "four"]; numbers.push("five"); numbers.push("six"); document.write(numbers.pop()); document.write... Read More
How to delete an entry using JavaScript?
Added on Thu, Jan 7, 2010
The "delete" operator removes an array element, but oddly does not change the size of the array. <script type="text/javascript"> var days = ["Sunday","Monday","Tuesday","Wednesday", "Thursday","Friday","Saturday"]; document.write("Number of... Read More
What is the difference between an alert box and a confirmation box?
Added on Thu, Jan 7, 2010
An alert box displays only one button which is the OK button whereas the Confirm box displays two buttons namely OK and cancel. Read More
How do you convert numbers between different bases in JavaScript?
Added on Thu, Jan 7, 2010
Use the parseInt() function, that takes a string as the first parameter, and the base as a second parameter. So to convert hexadecimal 3F to decimal, use parseInt ("3F", 16); Read More
Where are cookies actually stored on the hard disk?
Added on Thu, Jan 7, 2010
This depends on the user's browser and OS. In the case of Netscape with Windows OS,all the cookies are stored in a single file called cookies.txt c:Program FilesNetscapeUsersusernamecookies.txt In the case of IE,each cookie is stored... Read More
How to use "join()" to create a string from an array using JavaScript?
Added on Thu, Jan 7, 2010
Join" concatenates the array elements with a specified seperator between them. <script type="text/javascript"> var days = ["Sunday","Monday","Tuesday","Wednesday", "Thursday","Friday","Saturday"]; document.write("days:"+days.join(",")); <... Read More
How to use strings as array indexes using JavaScript?
Added on Thu, Jan 7, 2010
Javascript does not have a true hashtable object, but through its wierdness, you can use the array as a hashtable. <script type="text/javascript"> var days = ["Sunday"," Monday","Tuesday","Wednesday", "Thursday","Friday","Saturday"]; ... Read More
How to create a function using function constructor?
Added on Thu, Jan 7, 2010
The following example illustrates this It creates a function called square with argument x and returns x multiplied by itself. var square = new Function ("x","return x*x"); Read More
What is JavaScript?
Added on Thu, Jan 7, 2010
JavaScript is a platform-independent, event-driven, interpreted programming language developed by Netscape Communications Corp. and Sun Microsystems. Originally called LiveScript (and still called LiveWireTM by Netscape in its compiled, server... Read More
What does the delete operator do
Added on Thu, Jan 7, 2010
The delete operator is used to delete all the variables and objects used in the program ,but it does not delete variables declared with var keyword. Read More
Example of using Regular Expressions for syntax checking in JavaScript?
Added on Thu, Jan 7, 2010
var re = new RegExp(" ^(&[A-Za-z_0-9]{1,}=[A-Za-z_0-9]{1,})*$" ) var text = myWidget.value var OK = re. test(text) if( ! OK ) { alert(" The extra parameters need some work. Should be something like: " &a=1&c=4" " ) } Read More
What?s relationship between JavaScript and ECMAScript?
Added on Thu, Jan 7, 2010
ECMAScript is yet another name for JavaScript (other names include LiveScript). The current JavaScript that you see supported in browsers is ECMAScript revision 3. Read More
Can javascript code be broken in different lines?
Added on Thu, Jan 7, 2010
Breaking is possible within a string statement by using a backslash at the end but not within any other javascript statement. that is , document.write("Hello world"); is possible but not document.write ("hello world"); Read More
What does undefined value mean in javascript?
Added on Thu, Jan 7, 2010
Undefined value means the variable used in the code doesnt exist or is not assigned any value or the property doesnt exist. Read More
How i will use email validation in java script, Like. User can't enter invalid email address?
Added on Thu, Jan 7, 2010
First of all, here is the javascript function that tests if an email address is valid.<br>It checks for a lot of things: to see if the email contains a "@" sign and a dot, checks to see if the @ is before the dot, and so on.<br><br... Read More
What?s relationship between JavaScript and ECMAScript
Added on Thu, Jan 7, 2010
ECMAScript is yet another name for JavaScript (other names include LiveScript). The current JavaScript that you see supported in browsers is ECMAScript revision 3. Read More
How to detect the operating system on the client machine?
Added on Thu, Jan 7, 2010
In order to detect the operating system on the client machine, the navigator.appVersion string (property) should be used. Read More
What's Prototypes for JavaScript?
Added on Thu, Jan 7, 2010
Objects have "prototypes" from which they may inherit fields and functions. <script type="text/javascript"> function movieToString() { return("title: "+this.title+" director: "+this.director); } function movie(title, director) { this... Read More
How can JavaScript make a Web site easier to use? That is, are there certain JavaScript techniques that make it easier for people to use a Web site?
Added on Thu, Jan 7, 2010
JavaScript's greatest potential gift to a Web site is that scripts can make the page more immediately interactive, that is, interactive without having to submit every little thing to the server for a server program to re-render the page and ... Read More
What does break and continue statements do?
Added on Thu, Jan 7, 2010
Continue statement continues the current loop (if label not specified) in a new iteration whereas break statement exits the current loop. Read More
How to associate functions with objects using JavaScript?
Added on Thu, Jan 7, 2010
Let's now create a custom "toString()" method for our movie object. We can embed the function directly in the object like this. <script type="text/javascript"> function movie(title, director) { this.title = title; this.director =... Read More
How to create arrays in JavaScript?
Added on Thu, Jan 7, 2010
We can declare an array like this var scripts = new Array(); We can add elements to this array like this scripts[0] = "PHP"; scripts[1] = "ASP"; scripts[2] = "JavaScript"; scripts[3] = "HTML"; Now our array scrips has 4 elements inside it... Read More
How to create an object using JavaScript?
Added on Thu, Jan 7, 2010
Objects can be created in many ways. One way is to create the object and add the fields directly. <script type="text/javascript"> var myMovie = new Object(); myMovie.title = " Aliens"; myMovie.director = " James Cameron"; document... Read More
How to shift and unshift using JavaScript?
Added on Thu, Jan 7, 2010
script type="text/javascript"> var numbers = ["one", "two", "three", "four"]; numbers.unshift("zero"); document.write(" "+numbers.shift()); document.write(" "+numbers.shift()); document.write(" "+numbers.shift()); </script> This produces... Read More
What is a fixed-width table and its advantages?
Added on Thu, Jan 7, 2010
Fixed width tables are rendered by the browser based on the widths of the columns in the first row, resulting in a faster display in case of large tables. Use the CSS style table-layout:fixed to specify a fixed width table. If the table is not... Read More
What can javascript programs do?
Added on Thu, Jan 7, 2010
Generation of HTML pages on-the-fly without accessing the Web server. The user can be given control over the browser like User input validation Simple computations can be performed on the client's machine The user's browser, OS, screen size... Read More
How can JavaScript be used to personalize or tailor a Web site to fit individual users?
Added on Thu, Jan 7, 2010
JavaScript allows a Web page to perform "if-then" kinds of decisions based on browser version, operating system, user input, and, in more recent browsers, details about the screen size in which the browser is running. While a server CGI program can... Read More
Are you concerned that older browsers don't support JavaScript and thus exclude a set of Web users? individual users?
Added on Thu, Jan 7, 2010
Fragmentation of the installed base of browsers will only get worse. By definition, it can never improve unless absolutely everyone on the planet threw away their old browsers and upgraded to the latest gee-whiz versions. But even then, there are... Read More
Is a javascript script faster than an ASP script?
Added on Thu, Jan 7, 2010
Yes.Since java script 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. Read More
How is JavaScript different from Java?
Added on Thu, Jan 7, 2010
JavaScript was developed by Brendan Eich of Netscape Java was developed at Sun Microsystems. While the two languages share some common syntax, they were developed independently of each other and for different audiences. Java is a full-fledged... Read More
Are Java and Java Script the Same?
Added on Thu, Jan 7, 2010
No.java and java script are two different languages. Java is a powerful object - oriented programming language like C++,C whereas Java script is a client-side scripting language with some limitations. Read More
How can JavaScript be used to improve the "look and feel" of a Web site? By the same token, how can JavaScript be used to improve the user interface?
Added on Thu, Jan 7, 2010
On their own, Web pages tend to be lifeless and flat unless you add animated images or more bandwidth-intensive content such as Java applets or other content requiring plug-ins to operate (Shockwave and Flash, for example). Embedding JavaScript... Read More
What are the problems associated with using JavaScript, and are there JavaScript techniques that you discourage?
Added on Thu, Jan 7, 2010
Browser version incompatibility is the biggest problem. It requires knowing how each scriptable browser version implements its object model. You see, the incompatibility rarely has to do with the core JavaScript language (although there have been... Read More
What is the difference between a web-garden and a web-farm?
Added on Thu, Jan 7, 2010
Web-garden - An IIS6.0 feature where you can configure an application pool as a web-garden and also specify the number of worker processes for that pool. It can help improve performance in some cases. Web-farm - a general term referring to a... Read More
What is negative infinity?
Added on Thu, Jan 7, 2010
It?s a number in JavaScript, derived by dividing negative number by zero. Read More
Taking a developer?s perspective, do you think that that JavaScript is easy to learn and use?
Added on Thu, Jan 7, 2010
One of the reasons JavaScript has the word "script" in it is that as a programming language, the vocabulary of the core language is compact compared to full-fledged programming languages. If you already program in Java or C, you actually have to... Read More
What is the difference between SessionState and ViewState?
Added on Thu, Jan 7, 2010
ViewState is specific to a page in a session. Session state refers to user specific data that can be accessed across all pages in the web application. Read More
What is the data type of variables of in JavaScript?
Added on Thu, Jan 7, 2010
All variables are of object type in JavaScript. Read More
What does the EnableViewStateMac setting in an aspx page do?
Added on Thu, Jan 7, 2010
Setting EnableViewStateMac=true is a security measure that allows ASP.NET to ensure that the viewstate for a page has not been tampered with. If on Postback, the ASP.NET framework detects that there has been a change in the value of viewstate that... Read More
Methods GET and POST in HTML forms - what's the difference?
Added on Thu, Jan 7, 2010
GET: Parameters are passed in the query string. Maximum amount of data that can be sent via the GET method is limited to about 2kb. POST: Parameters are passed in the request body. There is no limit to the amount of data that can be... Read More
What does the term sticky session mean in a web-farm scenario? Why would you use a sticky session? What is the potential disadvantage of using a sticky session?
Added on Thu, Jan 7, 2010
Sticky session refers to the feature of many commercial load balancing solutions for web-farms to route the requests for a particular session to the same physical machine that serviced the first request for that session. This is mainly used to ensure... Read More
How to write a script for "Select" lists using JavaScript?
Added on Thu, Jan 7, 2010
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. ... Read More
Text From Your Clipboard?
Added on Thu, Jan 7, 2010
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 Read More
What is the difference between undefined value and null value?
Added on Thu, Jan 7, 2010
i)Undefined value cannot be explicitly stated that is there is no keyword called undefined whereas null value has keyword called null. (ii)typeof undefined variable or property returns undefined whereas typeof null value returns object. Read More
Does java script have the concept level scope?
Added on Thu, Jan 7, 2010
No. JavaScript does not have block level scope, all the variables declared inside a function possess the same level of scope unlike c,c++,java. Read More
What are undefined and undeclared variables?
Added on Thu, Jan 7, 2010
Undeclared variables are those that are not declared in the program (do not exist at all),trying to read their values gives runtime error.But if undeclared variables are assigned then implicit declaration is done . Undefined variables are those that... Read More
Are Java and JavaScript the Same?
Added on Thu, Jan 7, 2010
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. Read More
How to make elements invisible ?
Added on Thu, Jan 7, 2010
Change the "visibility" attribute of the style object associated with your element. Remember that a hidden element still takes up space, use "display" to make the space disappear as well. if ( x == y) { myElement.style.visibility = 'visible&... Read More
How to embed JavaScript in a web page?
Added on Thu, Jan 7, 2010
JavaScript code can be embedded in a web page between <script langugage="javascript"> //Place Your JavaScript here. </script> tags Read More
How to set the cursor to wait ?
Added on Thu, Jan 7, 2010
In theory, we should cache the current state of the cursor and then put it back to its original state. document. body.style.cursor = 'wait'; //do something interesting and time consuming document.body.style.cursor = 'auto'; Read More
What and where are the best JavaScript resources on the Web?
Added on Thu, Jan 7, 2010
The Web has several FAQ areas on JavaScript. The best place to start is something called the meta-FAQ [14-Jan-2001 Editor's Note: I can't point to it anymore, it is broken!], which provides a high-level overview of the JavaScript help... Read More
How to convert numbers to strings using JavaScript?
Added on Thu, Jan 7, 2010
You can prepend the number with an empty string var mystring = ""+myinteger; or var mystring = myinteger.toString(); You can specify a base for the conversion, var myinteger = 14; var mystring = myinteger.toString(16); mystring will be "e". Read More
How to test for bad numbers using JavaScript?
Added on Thu, Jan 7, 2010
the global method, "isNaN()" can tell if a number has gone bad. var temperature = parseFloat(myTemperatureWidget.value); if(!isNaN(temperature)) { alert("Please enter a valid temperature."); } Read More
What does the delete operator do?
Added on Thu, Jan 7, 2010
The delete operator is used to delete all the variables and objects used in the program ,but it does not delete variables declared with var keyword. Read More
What does "1"+2+4 evaluate to?
Added on Thu, Jan 7, 2010
Since 1 is a string, everything is a string, so the result is 124. Read More
What are the ways to emit client-side JavaScript from server-side code in ASP. NET?
Added on Thu, Jan 7, 2010
The Page object in ASP. NET has two methods that allow emitting of client-side JavaScript: RegisterClientScriptBlock and RegisterStartupScript. Example usage: Page.RegisterClientScriptBlock("ScriptKey", "<script language=javascript>" + ... Read More
What is the difference between RegisterClientScriptBlock and RegisterStartupScript
Added on Thu, Jan 7, 2010
RegisterClientScriptBlock emits the JavaScript just after the opening tag. RegisterStartupScript emits the JavaScript at the bottom of the ASP. NET page just before the closing tag. Read More
How to get the contents of an input box using JavaScript?
Added on Thu, Jan 7, 2010
Use the "value" property. var myValue = window.document.getElementById("MyTextBox").value; Read More
How to determine the state of a checkbox using JavaScript?
Added on Thu, Jan 7, 2010
Determining the state of a checkbox in JavaScript var checkedP = window.document.getElementById("myCheckBox").checked; Read More
How to set the focus in an element using Javascript?
Added on Thu, Jan 7, 2010
Setting the focus in an element using JavaScript <script> function setFocus() { if(focusElement != null) { document.forms[0].elements["myelementname"].focus(); } } </script> Read More
How to access an external JavaScript file that is stored externally and not embedded?
Added on Thu, Jan 7, 2010
This can be achieved by using the following tag between head tags or between body tags. <script src="abc.js"></script>How to access an external JavaScript file that is stored externally and not embedded? where abc.js is the external... Read More
What Web sites do you feel use JavaScript most effectively (i.e., best-in-class examples)? The worst?
Added on Thu, Jan 7, 2010
The best sites are the ones that use JavaScript so transparently, that I'm not aware that there is any scripting on the page. The worst sites are those that try to impress me with how much scripting is on the page. Read More
How about 2+5+"8"?
Added on Thu, Jan 7, 2010
Since 2 and 5 are integers, this is number arithmetic, since 8 is a string, it?s concatenation, so 78 is the result. Read More
What looping structures are there in JavaScript?
Added on Thu, Jan 7, 2010
JavaScript supports the for loop, while loop, do-while loop, but there is no foreach loop in JavaScript. Read More
To put a "close window" link on a page?
Added on Thu, Jan 7, 2010
<a href='javascript:window.close()' class='anyCSSClass'> Close </a> Read More
How to hide JavaScript code from old browsers that don't run it?
Added on Thu, Jan 7, 2010
Use the below specified style of comments <script language=javascript> <!-- javascript code goes here // --> or Use the <NOSCRIPT>some html code </NOSCRIPT> tags and code the display html statements between these and this will... Read More
How to comment JavaScript code?
Added on Thu, Jan 7, 2010
Use // for a single line comments in JavaScript and /* start of Multiple lines comment in JavaScript Multiple line comments in JavaScript */ for block comments in JavaScript Read More
What does JavaScript null mean?
Added on Thu, Jan 7, 2010
The null value is a unique value representing no value or no object. It implies no object, or null string, no valid Boolean value, no number and no array object. Read More
How do you create a new object in JavaScript?
Added on Thu, Jan 7, 2010
Answers: Create a new object in JavaScript var obj = new Object(); //or var obj = {}; Read More
How do you assign object properties?
Added on Thu, Jan 7, 2010
obj["age"] = 17; //or obj.age = 17; Read More
What?s a way to append a value to an array?
Added on Thu, Jan 7, 2010
Way to append a value to an array in JavaScript arr[arr.length] = value; Read More
What is this keyword?
Added on Thu, Jan 7, 2010
In JavaScript this keywork refers to the current object. Read More
You have an ASP. NET web application running on a web-farm that does not use sticky sessions - so the requests for a session are not guaranteed to be served the same machine. Occasionally, the users get error message Validation of view state MAC fail
Added on Thu, Jan 7, 2010
The most common reason for this error is that the the machine key value in machine.config is different for each server. As a result, view state encoded by one machine cannot be decoded by another. To rectify this, edit the machine.config file on each... Read More
To set all checkboxes to true using JavaScript?
Added on Thu, Jan 7, 2010
//select all input tags function SelectAll() { var checkboxes = document.getElementsByTagName("input"); for(i=0;i<checkboxes.length;i++) { if(checkboxes.item(i).attributes["type"].value == "checkbox") { checkboxes.item(i).checked = true; } } } Read More
How to select an element by id and swapping an image?
Added on Thu, Jan 7, 2010
script language="JavaScript" type="text/javascript" > function setBeerIcon() { var beerIcon = document.getElementById("beerIcon"); beerIcon.src = "images/"+getSelectValue(" beer")+".jpg"; } </script> <img border="0" src="" id="brandIcon"... Read More
What is variable typing in JavaScript?
Added on Thu, Jan 7, 2010
It is perfectly legal to assign a number to a variable and then assign a string to the same variable as follows example i = 10; i = "string"; This is called variable typing Read More
Does JavaScript have the concept level scope?
Added on Thu, Jan 7, 2010
No. Javascript does not have block level scope, all the variables declared inside a function possess the same level of scope unlike c, c++, java. Read More
What is === operator?
Added on Thu, Jan 7, 2010
In JavaScript === is strict equality operator ,it returns true only when the two operands are having the same value without any type conversion. Read More
How to find the selected radio button immediately using the 'this' variable?
Added on Thu, Jan 7, 2010
<script> function favAnimal(button) { alert('You like '+button.value+'s.'); } </script> <input type="radio" name="marsupial" value="kangaroo" onchange="favAnimal(this)">Kangaroo <br /><input type=... Read More
How to find radio button selection when a form is submitted?
Added on Thu, Jan 7, 2010
<script type="text/javascript"> function findButton() { var myForm = document.forms.animalForm; var i; for(i=0;i<myForm.marsupial.length; i++) { if(myForm.marsupial[i].checked) { break; } } alert("You selected ""+myForm.marsupial[i]... Read More
How to disable an HTML object?
Added on Thu, Jan 7, 2010
To disable an HTML object in JavaScript use below line of code... document.getElementById("myObject").disabled = true; Read More
To write messages to the screen without using "document.write()"?
Added on Thu, Jan 7, 2010
Changing the contents of an element is a much better solution. When the method showStatus is invoked it will change the content of the span. function showStatus(message) { var element = document.getElementById("mystatus"); element.textContent =... Read More
How to Add new elements dynamically?
Added on Thu, Jan 7, 2010
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Title of page</title> <script type="text/ javascript"> function addNode() { var newP = document.createElement("p"); var textNode =... Read More
How to have an element invoke a JavaScript on selection, instead of going to a new URL?
Added on Thu, Jan 7, 2010
<script type="text/javascript"> function pseudoHitMe() { alert("Ouch!"); } </script> <a href="javascript:pseudoHitMe()">hit me</a> Read More
How to have the status line update when the mouse goes over a link (The support of the status line is sporadic)?
Added on Thu, Jan 7, 2010
<a href=" javascript.shtml" onmouseover="window.status='Hi There!';return true" onmouseout="window.status='';return true">Look at the Status bar</a> Look at the Status bar as your cursor goes over the link. Read More
Explain unescape() and escape() in JavaScript?
Added on Thu, Jan 7, 2010
These are similar to the decodeURI() and encodeURI(), but escape() is used for only portions of a URI. < script type="text/javascript"> var myvalue = "Sir Robbert Scott"; document.write("Original myvalue: "+myvalue); document.write("<... Read More
How to create a popup warning box?
Added on Thu, Jan 7, 2010
Below line will help us how to create a popup warning box in JavaScript.... alert('Warning: Please enter an integer between 0 and 100.'); Read More
How to create a confirmation box?
Added on Thu, Jan 7, 2010
Below line will help us how to create a Confirmation box in JavaScript.... confirm("Do you really want to launch the missile today. HuM?"); Read More
How to create an input box?
Added on Thu, Jan 7, 2010
Below line will help us how to create a Input box in JavaScript.... prompt("What is your name?"); Read More
How to open a window with no toolbar, but with the location object?
Added on Thu, Jan 7, 2010
window.open ( "http://www.globalguideline.com", "Online Web Tutorials", "resizable=yes, " + "status=yes," + "toolbar=yes," + "location=yes," + "menubar=yes," + "scrollbars=yes," + "width=800," + "height=400" ); Read More
How to setting a cookie with the contents of a textbox
Added on Thu, Jan 7, 2010
Values stored in cookies may not have semicolons, commas, or spaces. You should use the handy "escape()" function to encode the values, and "unescape()" to retrieve them. //Sets cookie of current value for myTextBox function TextBoxOnchange() { ... Read More
How to getting values from cookies to set widgets?
Added on Thu, Jan 7, 2010
function getCookieData(labelName) { //from Danny Goodman var labelLen = labelName.length; // read cookie property only once for speed var cookieData = document.cookie; var cLen = cookieData.length; var i = 0; var cEnd; while (i < cLen) {... Read More
How to Handle Event Handlers?
Added on Thu, Jan 7, 2010
You can add an event handler in the HTML definition of the element like this, <script type="text/ javascript"><!-- function hitme() { alert("I've been hit!"); } // --> </script> <input type="button" id="hitme"... Read More
How to remove the event listener?
Added on Thu, Jan 7, 2010
script type="text/javascript"> document.getElementById("hitme4").removeEventListener("click", hitme4, false); </script> Key Events "onkeydown", "onkeypress", "onkeyup" events are supported both in ie and standards-based browsers. <... Read More
How to change style on an element?
Added on Thu, Jan 7, 2010
Between CSS and JavaScript is a weird symmetry. CSS style rules are laid on top of the DOM. The CSS property names like "font-weight" are transliterated into "myElement.style.fontWeight". The class of an element can be swapped out. For example: ... Read More
How to make elements invisible?
Added on Thu, Jan 7, 2010
Change the "visibility" attribute of the style object associated with your element. Remember that a hidden element still takes up space, use "display" to make the space disappear as well. if ( x == y) { myElement.style.visibility = 'visible&... Read More
Explain in brief about Java script
Added on Thu, Jan 7, 2010
Java Script, originally supported by netscape navigator, is the most popular web scripting language. Java Script lets you embed programs right in your web pages and run these programs using the web browser. With the introduction of dynamic html... Read More
How to set the cursor to wait?
Added on Thu, Jan 7, 2010
In theory, we should cache the current state of the cursor and then put it back to its original state. document.body.style.cursor = 'wait'; //do something interesting and time consuming document.body.style.cursor = 'auto'; Read More
How do we get JavaScript onto a web page?
Added on Thu, Jan 7, 2010
You can use several different methods of placing javascript in you pages. You can directly add a script element inside the body of page. 1. For example, to add the "last updated line" to your pages, In your page text, add the following: <p>... Read More
Explain about the structured programming features of Java Script?
Added on Thu, Jan 7, 2010
Java script supports most of the structured programming syntax present in ?C? language. It doesn?t support scoping which is present in C programming in block style. It also supports various forms and methods of testing the type of an object which... Read More
How to reload the current page?
Added on Thu, Jan 7, 2010
To reload the current web page using JavaScript use the below line of code... window.location.reload(true); Read More
Explain about inner functions and closures present in Function level programming?
Added on Thu, Jan 7, 2010
Each time the outer function is invoked an inner function is created. Variables for the outer function still continue to exist as long as the inner function exists. This process continues until invocation exists. This is the how closures work within... Read More
How to force a page to go to another page using JavaScript
Added on Thu, Jan 7, 2010
< script language="JavaScript" type="text/javascript" > <!-- location.href="http://www.globalguideline.com"; //--> </script> Read More
Explain functions as object constructors?
Added on Thu, Jan 7, 2010
If you prefix a new with a function call creates a new object and you can call that functions with a local keyword which is attached to that object. Object prototype property determines the functions prototype property. These functions act as object... Read More
How to convert a string to a number using JavaScript?
Added on Thu, Jan 7, 2010
We can use the parseInt() and parseFloat() methods in JavaScript to convert a string to a number or numeric value. Notice that extra letters following a valid number are ignored, which is kinda wierd but convenient at times. parseInt("100") ==>... Read More
Explain functions as methods?
Added on Thu, Jan 7, 2010
There is no big distinction between function definition and method definition. The only difference occurs when you actually call that function as a method which inturn is attached to an object. When the function is called in this manner its local... Read More
Explain about run time environment of Javascript?
Added on Thu, Jan 7, 2010
Java script does not have a sophisticated run time of its own but it relies on the web browser of the client. It relies on this run time environment for its functions and methods to perform their duties by which scripts can interact with the user... Read More
Explain about Variadic functions?
Added on Thu, Jan 7, 2010
When you use variadic function in Javascript, an indefinite number of parameters can be passed onto the function. Inturn the function can access the parameters through formal parameters and local arguments. Variadic functions are much successful... Read More
What's Math Constants and Functions using JavaScript?
Added on Thu, Jan 7, 2010
The Math object contains useful constants such as Math.PI, Math.E Math also has a zillion helpful functions in JavaScript. Math.abs(value); //absolute value Math.max(value1, value2); //find the largest Math.random() //generate a decimal... Read More
State some simple usages with Javascript?
Added on Thu, Jan 7, 2010
Some of the simple usages with Javascript are 1) A new pop up window can be made and changed according to the requirements such as no menus, scroll bars, etc. 2) Validation of input values submitted by the user through a web form. 3) Mouse over... Read More
What's the Date object using JavaScript?
Added on Thu, Jan 7, 2010
Time inside a date object is stored as milliseconds since Jan 1, 1970 in JavaScript. e.g. new Date(06,01,02) // produces "Fri Feb 02 1906 00:00:00 GMT-0600 (Central Standard Time)" new Date(06,01,02).toLocaleString() // produces "Friday,... Read More
What is a JavaScript engine?
Added on Thu, Jan 7, 2010
Java Script engine was first created by Netscape navigator. This engine interrupts the java script code and executes accordingly. The most common Java Script user interface is the web browser. Java script engine was created by Brendan. Read More
Explain about the security functions presents in JavaScript?
Added on Thu, Jan 7, 2010
As JavaScript uses Web as an interface it gives an ample scope for users to transfer malicious scripts. Most of the JavaScript related breaches and wrong doings are due to sandbox or same origin policy. Read More
How to delete an array entry using JavaScript?
Added on Thu, Jan 7, 2010
The "delete" operator removes an array element in JavaScript , but oddly does not change the size of the array. <script type="text/javascript"> var days = ["Sunday","Monday","Tuesday","Wednesday", "Thursday","Friday","Saturday"]; document... Read More
What are the precautions taken by the web browsers to contain malicious activity with Java Script?
Added on Thu, Jan 7, 2010
Java script activities are restricted by web browsers in two ways they are. 1) First scripts run in sandbox which performs the most basic functions such as executing or running the code or script. This doesn?t allow programming activities. 2)... Read More
What are the rare cases when Java Script will not function?
Added on Thu, Jan 7, 2010
These are the following cases when Java Script will not function. 1) An old browser which doesn?t support DOM. 2) PDA or Mobile Phone will not execute Java Script. 3) Security reasons will not allow optimal performance of Jscript. 4) Speech... Read More
Explain about Cross site scripting?
Added on Thu, Jan 7, 2010
Cross site scripting raises security threats during execution and secured data transfer through web sites. It uses same origin policy. When a malicious script is made to run it discloses private information to the wrong person. This occurs... Read More
Explain about arrays in Java Script?
Added on Thu, Jan 7, 2010
Array maps everything from an integer to Values. Objects map everything from values to integers, Javascript specialize in certain special functions through which they can include integer indicies in their behavior. Large indicies can be removed if... Read More
Explain about defining numbers in Java Script?
Added on Thu, Jan 7, 2010
Java Script represents numbers in the form of IEEE-754 doubles. This form of representation provides accuracy upto 14-15 significant digits. They represent fractions but not the decimal numbers to an extent. To perform explicit numeric conversion you... Read More
Explain about strings in JavaScript?
Added on Thu, Jan 7, 2010
Strings are represented as a sequence of characters in Javascript. Strings can be created when you place characters between double quotations or single quotations. Individual characters can be accessed by arrays. Read More
Explain about the Boolean functions present in Javascript?
Added on Thu, Jan 7, 2010
Three Boolean operators are present in Javascript they are 1) && 2) II 3) / All the operators are regarded as true unless the Javascript regards them as false. You can define these operators to make as statement false number0, null,... Read More
What is eval() in JavaScript?
Added on Thu, Jan 7, 2010
The eval() method is incredibly powerful allowing us to execute snippets of code during execution in JavaScript. <script type="text/javascript"> var USA_Texas_Austin = "521,289"; document.write("Population is "+eval("USA_"+"Texas_"+"Austin... Read More
What does break and continue statements do in JavaScript?
Added on Thu, Jan 7, 2010
Continue statement continues the current loop (if label not specified) in a new iteration whereas break statement exits the current loop in JavaScript. Read More
What are JavaScript Data Types?
Added on Thu, Jan 7, 2010
JavaScript Data Types are Number, String, Boolean, Function, Object, Null, Undefined Read More
What are decodeURI() and encodeURI() functions in JavaScript?
Added on Thu, Jan 7, 2010
Many characters cannot be sent in a URL, but must be converted to their hex encoding. These functions are used to convert an entire URI (a superset of URL) to and from a format that can be sent via a URI. <script type="text/javascript"> var... Read More
How to add Buttons in JavaScript?
Added on Thu, Jan 7, 2010
The most basic and ancient use of buttons are the " submit" and " clear" , which appear slightly before the Pleistocene period. Notice when the " GO!" button is pressed it submits itself to itself and appends the name in the URL. < form action=... Read More
Where can I find online documentation for JavaScript?
Added on Thu, Jan 7, 2010
ECMAScript (ECMA-262) has since June 1997 been the official scripting standard for the Web. It is documented at: http://www.ecma.ch/stand/ecma-262.htm Read More
Where is the official bug list for JavaScript?
Added on Thu, Jan 7, 2010
Netscape maintains a page of JavaScript Known Bugs in its online Navigator Release Notes. Unfortunately, according to guru Danny Goodman, "this list is not complete," and we know of no definitive, well-maintained alternative. Read More
What are the language's basic entities?
Added on Thu, Jan 7, 2010
As in most object-oriented, event-driven programming languages, there are four distinct entities in JavaScript: * OBJECTS. A discussion of objects is beyond the scope of this FAQ (see the section "Objects and the Web" in Intranet Journal'... Read More
How does JavaScript model the world
Added on Thu, Jan 7, 2010
This question goes to the heart of any OOPS [Object-Oriented Programming System]. The abbreviated answer given here -- lengthy as it is -- omits important differences between the Netscape and Microsoft broswer object models, and between various... Read More
How is JavaScript syntax like C / C++?
Added on Thu, Jan 7, 2010
The languages have enough in common to make learning one easy if you know the other. By the same token, the differences are subtle enough to trip up those proficient in both. Here's a short list comparing C and JavaScript: * Terminating... Read More
How do I ...
Added on Thu, Jan 7, 2010
Question : How do I ... with JavaScript/JScript ... embed JavaScript in a web page? Answers: <SCRIPT LANGUAGE="JavaScript"> <!-- hide script from older... Read More
with JavaScript/JScript
Added on Thu, Jan 7, 2010
Question : How do I ... with JavaScript/JScript ... use the same variable name several times in a script? Answers: By default all variables in JavaScript are global, meaning they retain... Read More
... use quotation marks when scripting?
Added on Thu, Jan 7, 2010
Question : How do I ... with JavaScript/JScript ... use quotation marks when scripting? Answers: There are two types of quote mark in JavaScript, the single-quote (') and double-quote ("). Either can be used to... Read More
How do I ...with JavaScript/JScript submit forms by e-mail
Added on Thu, Jan 7, 2010
Question : How do I ... with JavaScript/JScript ... submit forms by e-mail Answers: The most reliable way is to use straight HTML via a Submit style button. Set the ACTION of the <FORM> to a mailto... Read More
How do I ...with JavaScript/JScript ... script a visit counter?
Added on Thu, Jan 7, 2010
At best, a client-side script can show the visitor how many she has been to the site (storing the count in a local cookie). A count of total hits to the server requires a server-side program. Read More
What are JavaScript types?
Added on Thu, Jan 7, 2010
Number, String, Boolean, Function, Object, Null, Undefined. Read More
What does isNaN function do?
Added on Thu, Jan 7, 2010
Return true if the argument is not a number. Read More
How do you create a new object in JavaScript? ?
Added on Thu, Jan 7, 2010
var obj = new Object(); or var obj = {}; Read More
What is variable typing in javascript
Added on Thu, Jan 7, 2010
It is perfectly legal to assign a number to a variable and then assign a string to the same variable as follows example i = 10; i = "string"; This is called variable typing Read More
How to set a HTML document's background color?
Added on Thu, Jan 7, 2010
ocument.bgcolor property can be set to any appropriate color. Read More
How to access an external javascript file that is stored externally and not embedded
Added on Thu, Jan 7, 2010
This can be achieved by using the following tag between head tags or between body tags. <script src="abc.js"></script> where abc.js is the external javscript file to be accessed. Read More
How to hide javascript code from old browsers that dont run it?
Added on Thu, Jan 7, 2010
Use the below specified style of comments <script language=javascript> <!-- javascript code goes here // --> Read More
what is the differene between java and java script??
Added on Thu, Jan 7, 2010
Java Script is object based language it is used for front end validations. java is object oriented language object oriented language supports OOP?s Object based not suppoted inheritence. Read More
How do you target a specific frame from a hyperlink?
Added on Thu, Jan 7, 2010
Include the name of the frame in the target attribute of the hyperlink. <a href=?mypage.htm? target=?myframe?>>My Page</a> Read More
|