struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Nenning <>
Subject Re: Change the background color of each element in the dropdown list
Date Fri, 27 Feb 2015 08:18:16 GMT
>  I have a dropdown search box which includes All, Open, Closed.
> <s:select name="searchStatus" id="searchStatus" list="{'All', ' 
> Open', 'Closed'}"/>
> I want to make the background color changes based on the element 
> selected from the list.  Background is green if 'Open' is 
> selected, blue - 'All, red - 'Closed'.  Could you please help how to
> do this using struts2 tag?  Thanks a lot
> Regards,Lily  

You could register a JavaScript function as <s:select onchange="<your 
function here>" /> handler.


This Email was scanned by Sophos Anti Virus

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message