Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

display of UP and DOWN arrows

 
Chandu Sree
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 49
Java Python Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Chandu Sree
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you.

I will try it out..any other suggestions are also welcome...
 
Chandu Sree
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64708
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Chandu Sree
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic