JavaScript and AJAX Web Development Tutorials

JavaScript, jQuery and AJAX (Asynchronous JavaScript and XML) Tutorials.
  Title / Author Replies Reverse Sort Order
Views
The Javascript Code : function autoCompleteDB() { this.aNames=new Array(); } autoCompleteDB.prototype.assignArray=function(aList) { this.aNames=aList;
37
66,088
Sometimes, we need to rotate images on ours web pages, it may be ads or some simple images.Below you'll find the code for implementing the same. You can create as many image rotations you want, you just need to specify the urls of the images in an Array, and the object where the image will be...
26
369,948
Sometimes we need the user to enter only numbers in a text field, so I have some up with a small piece of JavaScript to do exactly that. It works for both IE and Firefox. function onlyNumbers(evt) { var e = event || evt; // for trans-browser compatibility var charCode = e.which ||...
18
200,604
JavaScript is the scripting language and is used for the web. It is used webpages for validating forms,adding different functionalities , for detecting different browsers and creating cookies. One can also improve the design of web page using JavaScript. With the help of JavaScript one can work on...
14
7,598
Well all would have at some point of time needed to make a timer in JavaScript. I have made a timer in Javascript. The script shows the timer in the status bar,you can modify it to display the timer anywhere you want. Check out the code below: var mins,secs,TimerRunning,TimerID; ...
12
127,604
On many forums like DigitalPoint you would see lots of people claiming to be making thousands of $$$ with an ebook that costs $1 and have lots of screenshots to show you as well. Never trust those. This can be done in Firefox and IE7 with just one line of code. Yes its true. One line exactly. ...
11
19,163
There are hundreds of DHTML trees available online, most of them and written from scratch, some easy to understand and implement, while others are real pain to customize. Some of them need a JavaScript array to be populated or read an XML file to generate the tree. I've tried to develop one...
10
33,425
Introduction One Javascript function that gets used such frequently than it should to be is "eval". "eval" evaluates the content of a text string passed to it and then executes it as if it were normal Javascript code.. Actually, we should never use eval for any purpose in our code, be it...
10
56,573
// The functions have been adapted from various sources // and re-written to provide maximum flexibility // and compatability with various browsers. //Global Declarations var ie = (document.all) ? true : false; function toggleClass(objClass){ // This function will toggle obj...
10
31,423
Non-JavaScript Programmers find it difficult to have fancy drop down menu's but not any more. Today I will show you how easy it is to create a simple yet very SEO Friendly Drop Down Menu Using JQuery. The idea of this article came from the thread started by siddharthrkulkarni on Drop Down Menu....
10
9,548
I needed to trim a string and also replace more than one spaces with a single space. The solution was simple with String.replace in JavaScript. Here's the code: var m = " My name is Pradeep "; m = m.replace(/^+/,'').replace(/+$/,'').replace(/{2,}/,' '); Making a function out of it. ...
7
114,802
Web-pages can take take time to load for variety of reasons and if your page takes lot of time to load you have to identify areas where most of the time is taken. I have seen that in most cases it is always the Advertisements. At least that was the case for Go4Expert. My next step was to load...
7
8,796
Introduction The throw statement allows you to create an exception. If you use this statement together with the try...catch statement, you can control program flow and generate accurate error messages. Use the throw statement to throw an exception. When you throw an exception,...
6
8,346
I found that is difficult to search a simple javascript code about scrolling image slide. You can find them on Internet but they often are long and complex or hidden from us to prevent edit. I just found a simple way to resolve this. I hope it will help your editting easier to make it yours! We...
6
18,777
There is a "bug" with the parseInt JavaScript function. The bug is not something that will affect you very often, but it is something you should be aware of. We've seen the bug in every browser except Opera. I've created a button to demonstrate the bug. The bug is that parseInt can return an...
5
35,751
Sometimes we need a sorted UL (un-ordered list) in a static page, like a blog, we can use JavaScript to the sort the list. I faced a similar problem with my blog, so I implement a simple bubble sort on the list, the list will be sorted if the browser supports JavaScript, else it will still...
5
47,047
Arrays are one way of keeping a program more organized. They allow you to do some things that are difficult without them. Arrays are usually a group of the same variable type that use an index number to distinguish them from each other. Suppose you wanted to write out 5 names, and use variables for...
5
16,766
Background Many time we found the file worm.vbs in our computer in each dir. worm.vbs may or may not be malicious. but when they execute's they consume CPU. So, Better option is to remove them. but it is tough job as they exist in each dir. I written a vbScript to...
5
4,565
Have you ever wondered when you see form on some website submitted in a fraction of a second? Have you ever wanted such forms on your site? This is it. Let us take a sample form. <form method="post" action="SubmitToSomeFile" id="frm" accept-charset=UTF-8 name="frm"> <table...
5
7,164
Introduction Some characters are reserved in HTML. For example, you cannot use the greater than or less than signs within your text because the browser could mistake them for markup. If we want the browser to actually display these characters we must insert character entities in the HTML...
4
3,739