Showing posts with label javascript. Show all posts
Showing posts with label javascript. Show all posts

Wednesday, December 29, 2010

Create a javascript ToolTip within 10 minutes for Asp.net page

Sometimes we need to create handy javascript tooltip for client. Here in this article i will show how one can create a javascript tooltip within very short time by using DIV object. To do that here i use a DIV as a tooltip container. When i need to show the tooltip then i have set the DIV visibility style to 'visible' otherwise 'hidden'. Very simple right? Lets start:










Add an Aspx page

Wednesday, August 4, 2010

How to prevent avoid Session Timeouts in an Asp.Net C# vb.net Page

As we knew that its a very big problem specially when developers provide a very large entry page to users. It will be Irritating for users after entering all data & then session timeout occur. To prevent or avoid session timeout problem, there is no fixed or specific or direct way to handle. But one can handle this problem using javascript asynchronous call. But one thing keep in mind that time

Monday, April 12, 2010

Add to Favorites (IE) / Bookmark (Mozilla Firefox, Opera) Page Javascript

Developers basically use shortcut command to add a page into favorite list or bookmark list but most of the users does not know how they can add an important page into their favorite list or bookmark list. Thats why if developer add a bookmark link or add to favorite link on important pages so that users can easily bookmark the page. Here in this article i will explain how one can add favorites

Tuesday, March 9, 2010

How to Show hide toggle display a DIV using javascript

In many cases developers need to show hide or toggle div container based on user requirement. Some of SEO specialists told that hiding a div is against SEO. But I want to tell that if your div appear with unchanged contents by user interaction then it’s ok for SEO. In many cases like you want to display a popup type window (which is basically a div) then you need to show or hide a div. Here in

Monday, March 8, 2010

Display Original Image Size in new or popup window when clicking on the thumbnail Image using javascript

In many cases like photo album application or e-commerce website product display page or e-commerce shopping cart we need to display thumbnail image first and then when user click on this image we want to show the full or original image in a popup window. In this article i will explain how one can display a full or enlarge or zoom image from thumbnail image. The output likes below:


To do that

Sunday, March 7, 2010

How to detect tab key is pressed by user in javascript

In many times we need to check or detect Tab key from cross browser javascript method to implement some business logic. In this regard here i want to show you how one can detect that user pressed or enter Tab key. One can also detect the TAB key to cancel the action. So you can do lots of work based on checking TAB key depends on user or client requirement.
Keep in mind one thing that TAB Key

Tuesday, March 2, 2010

WaterMark in ASP.Net TextBox Multiline TextBox TextArea using JavaScript

Basically developers use watermark textbox to give a small hint to the user to input valid or meaningfull data. We found a lot of way to watermark a TextBox using Javascript but in this article or tutorial i will explain a very simple and easy way to implement watermark in textbox / textarea / multiline TextBox. A sample output is given below:


The main javascript method to implement watermark

Monday, February 22, 2010

How to read GridView row column data using javascript

In some cases we need to read GridView row column data using javascript specially for search purpose. Also there were lots of reason to read GridView data using javascript. If you can read gridview data from a javascript function then you can implement lot of eye catching interface for your client.
The below javascript function wiil read gridview contents or loop through gridview rows:









Sunday, February 7, 2010

How to disable multiple button click in Asp.net

Disabling or preventing multiple mouse button click event on Asp.net page is a common task. Specially when you want to develop an e-commerce site client must want to disable the payment button after first click of the user. So that user can't click twice or double or multiple time.Normally we have used an onclick javascript event to diable the button after first click. In Asp.net each serverside

Friday, February 5, 2010

Javascript to check multiline textbox max length asp.net C# VB.Net

Most of the asp.net developers knew that maxlength property of textbox will work even the multiline property set to true. But it doesnot work. To check or restrict maxlength of a multiline textbox you have to develop a javascript fucntion. In this article i will show you how you can limit or restrict multine textbox character limit using javascript.
If you are looking for textarea then click here

Tuesday, February 2, 2010

Javascript to read Master Page and Content Page controls data

In many forums i found that asp.net c# vb.net developers ask expert how to read or access master page control from content page as well as how to get content page control from master page using clientside javascript. Thats why in this asp.net javascript tutorial i will explain how you can read or access content page controls from master page as well as read or access master page controls from

Sunday, January 31, 2010

Javascript innerText alternative for Mozilla Firefox

Since you are here i assume that you have already tried to work with innerText in cross-browser like mozilla firefox but you failed because in mozilla firefox the property innertext does not work. Don't there is an alternative method i will introduce in this javascript article or javascript tutorial. Before that i want to say something regarding innerHTML. Since most of the developers will

Check TextArea Max Length using Javascript

In many forums i found that Asp.Net C# VB.Net developers ask how to check max length of textarea HTML control. Thats why i think i post this topic. This article also resolve cross browser issue as well as copy paste problem in clipboard. When i am googling i found a lot of articles on this but i didn't get a javascript function which can resolve cross-browser issue as well as copy paste problem.

Thursday, January 14, 2010

Highlight GridView Row On MouseOver Using Javascript in Asp.net

Asp.net GridView gives us huge facility that we can't imagine few years ago. But still we have a lot of chance to improve look & feel as well as GridView functionality. Here in this article i will describe how you can highlight a gridview row when move the mouse over the row and also how to retain the original background color when user leaves the mouse from a row or in mouseout event. After

Wednesday, December 16, 2009

Javascript confirm message before delete from Asp.net LinkButton or Button Control

In our Asp.Net web application a common task is to insert, update or delete data from Database. It will be a good practice if you prompt user before deleting a row or data from Database since after deletion you can not retrieve data from database. Think if user click to delete a row & you don't prompt any message then the data will be deleted. If the user click on delete Button mistakenly then

Tuesday, December 8, 2009

Javascript to get CheckBoxList value

To read CheckBoxList Selected Value, Selected Index & Selected Text in serverside is an easy job but using javascript its a bit difficult. In this article i want to share with you how one can read CheckBoxList SelectedValue, SelectedIndex & SelectedText by using javascript. Before explanation i want to share with you that getting SelectedIndex & SelectedText from javascript is a bit easy rather

Friday, October 9, 2009

XMLHttpRequest to make Ajax Call using Javascript

In this AJAX Tutorial i will try to explain "What is AJAX" & how you can start to learn AJAX from very basic. Ajax means Asynchronous JavaScript and XML. Asynchronous means that when you send a request, you wait for the response to come back, but are free to do other things while you wait. Ajax is not a new technology but in these days we found it in a new way. Currently almost all developers

Sunday, September 27, 2009

How to change CSS class name using javascript

If you are aiming to make HTML elements and change its CSS properties without reloading the entire page then this post is for you. Most often we need to change CSS dynamically to fullfill user requirement. In this post i will show you through an example how we can achieve it. So that you can easily understand & change CSS class dynamically or runtime in your page by writing a simple javascript

Friday, August 28, 2009

Javascript Arrays Syntax and Examples

For each programming language array is a most common & popular object. Without array most of the times we can not make our logic. Thats why in this post i will try to give you a complete article on Javascript arrays, syntax with appropriate code examples. We knew that variables are used to store a single piece of information in the memory. Where as array can hold a series of information as its

Saturday, August 8, 2009

How to read asp radio button list selected value

Using javascript to get the asp radio button list selected value is not an easy job like other asp.net objects. To get the selected value from asp radio button list you have to iterate through all the radio buttons in that set and then read the value for checked radio button. In my previous post i have discussed on DropdownList or ComboBox. So in this post i will try to give you a complete