JavaScript Sample Code
-
Detect missing images with client-side script
by James Crowley
How to detect missing images with client-side javascript
-
Add a Bookmark
by Peeyush Nigam
Add a bookmark to the visitors Favourites folder in Internet Explorer
-
News Scroller
by Peeyush Nigam
Javascript News Scroller for IE 5 and above
-
Animated Text
by Peeyush Nigam
Animate text using JavaScript
-
TextArea character limits
by Super Tal
This code will show how to limit the number of character a user can enter into the HTML TextArea form field.
-
Encoding your script files
by ElementK Journals
Protect both your server-side and client-side scripting by using the MS encoding utility
-
Autolink
by David Nishimoto
Automatic jump to a url on when the mouse moves over a link
-
Format field to currency
by Super Tal
Formats a field to US dollar currency style.
-
Optional Arguments in JScript
by James Crowley
How to create optional arguments in JScript
-
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.
-
Dynamically filling ComboBoxes
by Kiran Pai
Filling the values of a dropdown SelectMenu depending on the selection in another Menu.
-
Visitors' Browser Information
by James Crowley
How to get information about the visitors browser
-
Converting a CR to a TAB in a Web Page
by Bruce Johnson
Pretty self explanatory, don't you think?
-
Browser Detect
by nzjonboy
Javascript to detect the browser being used to view your site
-
Creating Rollover effects
by Kiran Pai
How to change images using the MouseOver and MouseOut events to create a mouse roll-over effect
-
Highlighting phrases in text
by David Nishimoto
Returns a character phrase with html highlighting a Pattern. The hightlight is dependant on the Type.
-
Debugging client JavaScript in VS 2005
by Jimmy Skowronski
Short guide how to debug client JavaScript in VS 2005.
-
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.