aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes HTML Division Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "HTML Division" Watch "HTML Division" New topic
Author

HTML Division

Mani Natrajan
Greenhorn

Joined: Oct 12, 2009
Posts: 12
Hi,
I have a html page which has two divisions(left and right). I want the division to be resizeable.
I should be able to increase the width of each of the divisions using a mouse (It should work like a split pane in java swing).
Is it possible to acheive this in html?

Thanks in advance.

Mani Natarajan


SCJP
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

Mani Natrajan wrote:Is it possible to acheive this in html?

No.

But is is achievable with the combination of HTML, JavaScript and CSS.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Mani Natrajan
Greenhorn

Joined: Oct 12, 2009
Posts: 12
Thanks for the response.
Can you please let me know how it is achieved using javascript,css and html?

Mani Natarajan
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

Create an element between the two divs that can detect a mouse click and drag. When the mouse is released, use the information in the Event instance about the mouse location to determine how to resize the divs.
Mani Natrajan
Greenhorn

Joined: Oct 12, 2009
Posts: 12
Thanks.I will give it a try.

Mani Natarajan
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Better idea: use a JavaScript widget/library that has already implemented this.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

For example: jQuery UI Resizables.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HTML Division