• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

display of UP and DOWN arrows

 
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 ]
 
Ranch Hand
Posts: 49
Python Java 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
 
Marshal
Posts: 67388
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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
 
A wop bop a lu bob a womp bam boom. Tutti frutti ad:
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic