CodeSnip: How to Create a Resizable Div Layer
page 1 of 4
Published: 13 Dec 2006
Abstract
In this article Haissam Abdul Malak will show you an example of how to create a resizable Div layer using Javascript.
by Haissam Abdul Malak
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 25012/ 347

Introduction

In a project I was recently working on, one of the WebForms was composed of two Div layers; the first was used for displaying metadata and the second for displaying a file viewer component. The problem was raised when the metadata is large; the users had to scroll down to view the needed information. So we had to give the users the ability to resize the Div layer.

Using JavaScript, we can add this interaction between the web application and the users.

Before you continue, you should have a basic understanding of HTML, XHTML, and JavaScript to keep up with this demonstration.

In this article we will create a WebForm containing a Div layer and below this layer we will create a horizontal line.  Once the user presses on this line and moves the mouse, the layer’s height will increase or decrease according to which direction the user moves his mouse (up or down).

To accomplish this project we have to:

1- Create a new web application containing one WebForm; add the Div layer and the horizontal line by modifying the HTML code, and add handle some events.

2- Add a JavaScript file (ResizingDiv.js) to the project, link it to the WebForm, and write two responsible functions for the resizing operation or write the code directly inside the HTML.


View Entire Article

Article Feedback

Title:  
Name:  
Url: ( Optional )
Comment:  
Please add 2 and 6 and type the answer here:

User Comments

Title: Nice Work......   
Name: Akhya
Date: 6/21/2008 1:57:55 PM
Comment:
Good work ... I am also trying to resize the CR Viewer in the run time.. If possible sugg.. me plz..
Title: Good Work!   
Name: Bala
Date: 1/29/2008 4:31:16 AM
Comment:
Hai Good work!
i also need vertical resizing. can you help me?
Title: vertical resize   
Name: JF
Date: 9/19/2007 11:27:57 AM
Comment:
Do you have a way to rezise DIV vertically?
Title: i realy want to check this out   
Name: orix
Date: 7/16/2007 4:55:39 PM
Comment:
will post a message after checking
Title: Comment   
Name: Someone
Date: 5/9/2007 7:48:02 PM
Comment:
Hey, great article. I like it for its simplicity. What about dragging horizontally?
Title: Appreciated   
Name: Haissam Abdul Malak
Date: 12/15/2006 11:14:04 AM
Comment:
Thank u for ur comment...
it is really useful

Best Regards
Title: Super Cool Article   
Name: AzamSharp
Date: 12/13/2006 12:40:36 PM
Comment:
Super cool article! Great Work!!!

On a side note it would be great if the article had any screen shots or gif animation which shows the effect.

But anyway great article!

Product Spotlight
Product Spotlight 
Learn More
.NET Tools
asp.net shopping cart
asp.net chart control






Ads Powered by Lake Quincy Media
Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2008 ASPAlliance.com  |  Page Processed at 9/7/2008 7:11:19 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search