Outsider
Feb 21st, 2008, 10:29 AM
I'm in the middle of writing a web application in php, which uses a mysql database as the back end.
Anyway, I'm working on an interface to display a list of items. The list allows for the order of the items to be customized, so I've placed UP and DOWN arrow icons beside each line to allow the row to be moved up and down within the list.
The first row only gets a DOWN arrow (since it can't be moved any higher on the list) and the last row should only get a UP arrow (since it can't be moved any lower on the list).
What I don't know how to do is detect the last row displayed, so it only displays one arrow.
Any ideas on how to accomplish this?
Anyway, I'm working on an interface to display a list of items. The list allows for the order of the items to be customized, so I've placed UP and DOWN arrow icons beside each line to allow the row to be moved up and down within the list.
The first row only gets a DOWN arrow (since it can't be moved any higher on the list) and the last row should only get a UP arrow (since it can't be moved any lower on the list).
What I don't know how to do is detect the last row displayed, so it only displays one arrow.
Any ideas on how to accomplish this?