IntelliJ Java IDE
The moose likes HTML, CSS and JavaScript and the fly likes Putting an Image dynamically Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "Putting an Image dynamically " Watch "Putting an Image dynamically " New topic
Author

Putting an Image dynamically

Priya Jotwani
Ranch Hand

Joined: Oct 30, 2002
Posts: 53
Hi,

I have a JSP page where clicking on a particular column results in Javscript sorting(Ascending & Descending).Now I have to display a GIF file next to this column which indicates the Sorting Order.I have two GIFs for this.How do I put the GIFs dynamically based on the order of Sorting(ascending or descending) ?

Thanks in Advance,
Gjorgi Var
Ranch Hand

Joined: Feb 24, 2004
Posts: 85
In your function that fires on onclick for selecting that particular column you associate the GIF with the chosen order:

[ May 20, 2004: Message edited by: Gjorgi Var ]
Yuriy Fuksenko
Ranch Hand

Joined: Feb 02, 2001
Posts: 411
if you reload a page, when you do sorting:


if sorting is done using JavaScript:
 
 
subject: Putting an Image dynamically
 
Threads others viewed
JTable question....again!
need help sorting a string array alphabetically
Problem in Table sorting using javascript
sorting functionality in jsp
Sorting JTable in asc. or desc.?
MyEclipse, The Clear Choice