473,396 Members | 1,933 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

dynamic display

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>&nbsp; | &nbsp;</td>
<td class="gold">
<a id = "2007" title="2007" href="../
announcementList.do?year=2007">2007 </a>&nbsp; | &nbsp;
</td>
<td class="gold">
<a id = "2006" title="2006" href="../
announcementList.do?year=2006">2006</a>&nbsp; | &nbsp;
</td>
<td class="gold">
<a id = "2005"title="2005" href="../
announcementList.do?year=2005">2005 </a>&nbsp; | &nbsp;
</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

Oct 10 '08 #1
1 1326
On Oct 9, 11:38*pm, raj <2rajes...@gmail.comwrote:
hi
My html is:
Awful. Sorry, it has to be said.
>
<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>&nbsp; | &nbsp;</td>
* * * * * * * * * * <td class="gold">
* * * * * * * * * * * * <a id = "2007" title="2007" href="../
announcementList.do?year=2007">2007 </a>&nbsp; | &nbsp;
* * * * * * * * * * </td>
* * * * * * * * * * <td class="gold">
* * * * * * * * * * * * <a id = "2006" title="2006" href="../
announcementList.do?year=2006">2006</a>&nbsp; | &nbsp;
* * * * * * * * * * </td>
* * * * * * * * * * <td class="gold">
* * * * * * * * * * * * <a id = "2005"title="2005" *href="../
announcementList.do?year=2005">2005 </a>&nbsp; | &nbsp;
* * * * * * * * * * </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.
What if you want to go with a silver theme in the future? And how
will a color-blind person see your links? Are they to hover over
every word on the page looking for underlines?
>
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
Okay. It's your page.
>
function showYear(){
* * * * alert(<%= request.getParameter("year") %>);
Don't post server side code here.
* * * * var sYear = <%= request.getParameter("year") %>;
* * * * alert("sYear" +sYear);
* * * * if(sYear != null){
* * * * alert(sYear);
* * * * document.getElementById(sYear).style.color = "red";
* * * * }

}
Too much, too soon. Learn HTML and CSS first.
>
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
Rule #1. Start with valid markup. Then when something goes wrong,
you have one less variable to consider. And what a variable it is.
There are no standard specifications for HTML error correction.

Rule #2. Use a proper doctype so that browsers don't downshift into
quirks mode. Quirks mode is there to deal with invalid and/or
deprecated markup. If you followed the first rule, then you don't
have any.

Yes, it seems 99% of today's Websites break one or the other of these
rules. That's why scripts fail constantly on the Internet (and
seemingly never get fixed.) Follow the rules and you are way ahead of
the game.

So now debug the script. If you can't, post it without the server
side includes.
Oct 10 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Luis Ferrao | last post by:
Hi, To understand the problem, a small description of the situation should be provided: I have a Field Control that is made of a one row table with three columns. The table width is 100%, the...
7
by: Abraham Luna | last post by:
how do i stop the dynamic validators from breaking explorer if i use a dynamic validator and move to a different control it breaks explorer and i can type in the page when i'm not supposed to....
10
by: jflash | last post by:
Hello all, I feel dumb having to ask this question in the first place, but I just can not figure it out. I am wanting to set my site up using dynamic urls (I'm assuming that's what they're...
2
by: assgar | last post by:
Hi Developemnt on win2003 server. Final server will be linux Apache,Mysql and PHP is being used. I use 2 scripts(form and process). The form displays multiple dynamic rows with chechboxs,...
9
by: Tarscher | last post by:
hi all, I have this seemingly simple problem. I have lost a lot of time on it though. When a user selects a value from a dropdownlist (static control) a dynamic control is generated. I have...
1
by: Peterwkc | last post by:
Hello all expert, i have two program which make me desperate bu after i have noticed the forum, my future is become brightness back. By the way, my problem is like this i the first program was...
0
by: Eniac | last post by:
Hi, I've been working on a custom user control that needs to be modified and the validation is causing me headaches. The control used to generate a table of 4 rows x 7 columns to display all...
9
by: pbd22 | last post by:
Hi. This is just a disaster management question. I am using XMLHTTP for the dynamic loading of content in a very crucial area of my web site. Same as an IFrame, but using XMLHTTP and a DIV. I...
3
by: creative1 | last post by:
Here is how you create a complex data report that involves parent and child commands and you can update information at runtime. Its pretty straight forward to work with simple queries; however,...
20
by: sirsnorklingtayo | last post by:
hi guys please help about Linked List, I'm having trouble freeing the allocated memory of a single linked list node with a dynamic char* fields, it doesn't freed up if I use the FREE()...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.