JavaScript Sample Code
-
Debugging client JavaScript in VS 2005
by Jimmy Skowronski
Short guide how to debug client JavaScript in VS 2005.
-
The AJAX "Top 5" security tips
by Moe Tarhini
There is no doubt that AJAX and AJAX-style technologies are the way forward for web design. Developers can create true "applications" on the web like never before - however care needs to be taken with AJAX, in order to keep web sites secure.
-
Validate Phone or Fax Number
by Pradip Patel
This is a small javascript function that can be used to validate a phone or fax number.
-
Building an 'AJAX' ProgressBar in Atlas
by Wilco Bauwer
Learn how to write a basic, client-side Atlas progress bar, and download the source code.
-
How to disable all elements on a form
by Edward Tanguay
You almost always want to have your form to be disabled as soon as the user pressed the submit button so that the user doesn't accidently submit the form twice. Here's how.
-
Trimming form fields
by Andy Clarke
Web forms often ask visitors for non-essential information, but long and complicated forms can seriously hinder the e-commerce sales process. Wouldn't it be cool to give users the option to hide these optional fields at their own discretion, and with a clever use of Javascript, the DOM and some CSS we can!
-
A Simple ASP.NET MessageBox Class
by Lee Gunn - .NET C# Scotland
When moving from Windows Forms to ASP.NET Web Forms, an API that may be missed is that offered by the System.Windows.Forms.MessageBox Class. Here we implement it for ASP.NET!
-
Add a JavaScript popup to an ASP.NET button
by Edward Tanguay
How to add a javascript popup (alert) question to an ASP.NET button control.
-
Display the Current Day of the Week
by David Nishimoto
How to display the current day of the week.
-
How to simulate a status bar in a Web application
by Edward Tanguay
If you have a process that takes over 20 seconds or so on a Web application, you may want to let the user know the status of the process. Edward shows you how.
-
Adding controls to PlaceHolders dynamically
by Edward Tanguay
A simple example demonstrating how to dynamically add controls to a PlaceHolder control.
-
MS Agent in a web site
by Warren
Ever wondered how to use the MS Agent characters from your website? This example demonstrates how, using JavaScript and VB Script
-
Force case restrictions
by Super Tal
Change a text field to all lowercase or uppercase before submitting.
-
Determining Client Capabilities
by Peeyush Nigam
Determine the capabilities of a client browser from the resolution to the user language.
-
Highlighting phrases in text
by David Nishimoto
Returns a character phrase with html highlighting a Pattern. The hightlight is dependant on the Type.
-
News Scroller
by Peeyush Nigam
Javascript News Scroller for IE 5 and above
-
Building a MultiDimensional Array in Javascript
by David Nishimoto
Building a MultiDimensional Array in Javascript
-
Autolink
by David Nishimoto
Automatic jump to a url on when the mouse moves over a link
-
User Defined Splice function
by David Nishimoto
Returns all previous character up to the pattern match
-
Rotating Images
by David Nishimoto
Rotating Image and Dynamically Change the Link