my dog learned polymorphism*
The moose likes HTML, CSS and JavaScript and the fly likes display of UP and DOWN arrows 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 "display of UP and DOWN arrows" Watch "display of UP and DOWN arrows" New topic
Author

display of UP and DOWN arrows

Chandu Sree
Greenhorn

Joined: Oct 04, 2007
Posts: 22
Hi,

I have to display UP and Down arrows in the JSP,in such a way that if the user selects the Up arrow then the selected row should move up and the above row should move down and the arrows displaying must change with respect to their positions.Like the first row sould come up with only DOWN arrow and middle rows with UP and Down arrows and last row with UP arrow.

Please can anyone help me out in solving.

Waiting for your replies..

Thanks.
[ April 16, 2008: Message edited by: Bear Bibeault ]
Jilesh Lakhani
Ranch Hand

Joined: Jul 26, 2006
Posts: 49

Check something with JavaScript, and I am sure you will get your answers.

pseudo code,
1) OnClick, get the selected Item and its current index
2) remove the element and add it back with the current index -2 (for moving up) current index +2 (for moving down)

I guess that should help you out


-Jilesh
Universe and Knowledge has no bounderies
Chandu Sree
Greenhorn

Joined: Oct 04, 2007
Posts: 22
Thank you.

I will try it out..any other suggestions are also welcome...
Chandu Sree
Greenhorn

Joined: Oct 04, 2007
Posts: 22
Hi,

Can anyone tell me how to display the UP and down arrow images depending on the row's position.Like for the first row only DOWN arrow should be displayed and for second row both up and down arrows and last row only up arrow.

Waiting for the reply..

Thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60782
    
  65

Originally posted by Chandu Sree:
Waiting for the reply..
With such a display of impatience you may end up waiting a long time. Please read this for more information on why such phrases should be avoided.

Moreover, you'll find you'll get the most help when you put in a little effort yourself. People will help you write your code, but will be reluctant to write it for you. Please read this for more information.
[ April 16, 2008: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Chandu Sree
Greenhorn

Joined: Oct 04, 2007
Posts: 22
Sorry ..I din't mean waiting for other's help with any trails..
I tried it and I got it..i wrote it only so tat with the replies I can compare and write optimal code...


Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: display of UP and DOWN arrows
 
Similar Threads
HTML Table events?
How to place JTable rows in desired order
Problem with row focus and scroll
Dynamic Table Issue
JTable not showing combobox dropdown arrow