While working with Web projects those required cross browser compatibility we often need to detect the browser type,like ie, Firefox Mozilla, or chrome...etc.
In this post we will see how to find ie browser. This is done using navigator object in JavaScript. Navigator has appName property that we can use to find ie browser.
JavaScript to detect...
Showing posts with label Javascript. Show all posts
Showing posts with label Javascript. Show all posts
Regex for email validation JavaScript

In this post we will see how to validate email format in Javascript using regular expression. We can use regular expression (/^([\w\.\-]+)@([\w\-]+)((\.(\w){2,3})+)$/i) to validate the email address in javascript.Example of email validation using regex...
Confirmationbox in javascript

In asp.net we need to show javascript confirmation box before doing some action.For example if we want to delete some record on the form, and we need users confirmation before deletion happens.
Sample code to show confirmation box in Javascript<html...
Get IndexOf string in Javascript

In JavaScript strings IndexOf() function is used to find position of specified character in the string. When IndexOf() method is used in javascript it returns position of first occurrence of the given character. If specified character is not found...
Split string JavaScript

In JavaScript we need to split the string to perform some operations on string. JavaScript uses Split() method to split the given string in JavaScript. Split() method basically split string into array of substrings and generates new array.String split...
do Postback in Javascript [ASP.NET]

In this post we will see how to postback page in ASP.NET from the client side using JavaScript. In some cases we need to postback page from client side i.e. by using JavaScript.
We can use __doPostBack() to postback page from client script using JavaScript.Or...