R
raj
hi
My html is:
<Table style="year-button-archive" width="60%" >
<tr>
<td class="gold" >
<a title="year">By Year:</a>
<td class="gold">
<a id = "2008" title="2008" href="../
announcementList.do?year=2008">
2008
</a> | </td>
<td class="gold">
<a id = "2007" title="2007" href="../
announcementList.do?year=2007">2007 </a> |
</td>
<td class="gold">
<a id = "2006" title="2006" href="../
announcementList.do?year=2006">2006</a> |
</td>
<td class="gold">
<a id = "2005"title="2005" href="../
announcementList.do?year=2005">2005 </a> |
</td >
<td class="gold">
<a id = "all" title="All" href="../
announcementList.do?year=all">All </a>
</td>
</tr>
</Table>
my css
1. .gold {
2. color: #877514;
3. }
4. .gold A:link {COLOR: #877514; TEXT-DECORATION: none }
5. .gold A:visited {COLOR: #877514; TEXT-DECORATION: none }
6. .gold A:hover {COLOR:red; TEXT-DECORATION: underline; }
7. .gold A:active {COLOR: #877514; TEXT-DECORATION: none }
8.
on clicking the year i need to change the colour to red and should be
in red till i click another year.so i had written js
function showYear(){
alert(<%= request.getParameter("year") %>);
var sYear = <%= request.getParameter("year") %>;
alert("sYear" +sYear);
if(sYear != null){
alert(sYear);
document.getElementById(sYear).style.color = "red";
}
}
it works fine for the years 2008,7,6,5 ..in my first alert stmt
i get 2008,7,6,5 correctly from the request but when i click on all i
am not getting all from the request its taking full URL.
like http://localhost:8080/sgxt/announcementList.do?year=all
it should take
all alone.
what may be the cause of this behavior when its working for other
years
Thanks in advance
Raj
My html is:
<Table style="year-button-archive" width="60%" >
<tr>
<td class="gold" >
<a title="year">By Year:</a>
<td class="gold">
<a id = "2008" title="2008" href="../
announcementList.do?year=2008">
2008
</a> | </td>
<td class="gold">
<a id = "2007" title="2007" href="../
announcementList.do?year=2007">2007 </a> |
</td>
<td class="gold">
<a id = "2006" title="2006" href="../
announcementList.do?year=2006">2006</a> |
</td>
<td class="gold">
<a id = "2005"title="2005" href="../
announcementList.do?year=2005">2005 </a> |
</td >
<td class="gold">
<a id = "all" title="All" href="../
announcementList.do?year=all">All </a>
</td>
</tr>
</Table>
my css
1. .gold {
2. color: #877514;
3. }
4. .gold A:link {COLOR: #877514; TEXT-DECORATION: none }
5. .gold A:visited {COLOR: #877514; TEXT-DECORATION: none }
6. .gold A:hover {COLOR:red; TEXT-DECORATION: underline; }
7. .gold A:active {COLOR: #877514; TEXT-DECORATION: none }
8.
on clicking the year i need to change the colour to red and should be
in red till i click another year.so i had written js
function showYear(){
alert(<%= request.getParameter("year") %>);
var sYear = <%= request.getParameter("year") %>;
alert("sYear" +sYear);
if(sYear != null){
alert(sYear);
document.getElementById(sYear).style.color = "red";
}
}
it works fine for the years 2008,7,6,5 ..in my first alert stmt
i get 2008,7,6,5 correctly from the request but when i click on all i
am not getting all from the request its taking full URL.
like http://localhost:8080/sgxt/announcementList.do?year=all
it should take
all alone.
what may be the cause of this behavior when its working for other
years
Thanks in advance
Raj