Javascript

Quick Search

Complete Form Validation Script

August 14th, 2010 by admin
No comments »

The following code sample shows the complete ValidateContactForm function for the contact form.

function ValidateContactForm()
{
var name = document.ContactForm.Name;
var email = document.ContactForm.Email;
var phone = document.ContactForm.Telephone;
var nocall = document.ContactForm.DoNotCall;
var what = document.ContactForm.Subject;
Read More

Spacebar Check in TextBox Using Javascript

February 27th, 2010 by admin
1 comment »

Trim Function using java script.Validation for text box if there only space using java script.validation for space in text box using java script.

Solution:

Create A textbox with id txtname and a button id btntest and wite this function inside script tag.

function trim(string)
{
var a = string.replace(/^\s+/, ”);
return a.replace(/\s+$/, ”)
}
function TestTrim()
{

x = window.document.getElementById(“txtname”);
str=”Please … Read More

Regular Expressions in ASP.NET

February 27th, 2010 by admin
13 comments »

Description

The source code show how to use Regular Expressions in C#. The code Functions written for Validation Alphabet, Alphanumeric, Integer, Positive Integer, Floating point numbers. You just cut copy these functions and use in any program.

Explanation of Regular Expressions:

Regular expressions are use to search specified in the source string.

Examples:

Pattern#1
Regex … Read More

Converting Strings to Numbers

February 27th, 2010 by admin
6 comments »

 

How it works:
The argument of parseFloat must be a string or a string expression. The result of parseFloat is the number whose decimal representation was contained in that string (or the number found in the beginning of the string). If the string argument cannot be parsed as a decimal number, … Read More