473,386 Members | 1,973 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,386 software developers and data experts.

Table with Fixed Header not working after adding an onmouseover event

Hello,
Trying to do: I just want a table that I can scroll and that has fixed

headers.
Problem: I got it to work but when I added the onmouseover event it
didn't work anymore.
Replicate-Problem: Scrolldown the textbox and put the mouse over a row.

The headers will move up.
<!--HERE'S THE CODE -->
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Testing</title>
<style>
.Header_Row
{
position:relative;
}
tr.Header_Row th
{
background-color:#6495c2;
height:15px;
font-size: 11px;
color: white;
font-family: Verdana;
font-weight:bold;
border-right: black 1px solid;
border-top: white 1px solid;
border-left: white 1px solid;
border-bottom: black 1px solid;
}
.Primary_Data_Row {}
tr.Primary_Data_Row td
{
height:10px;
border-bottom:black 1px solid;
background-color:white;
font-size: 11px;
color: black;
font-family: Verdana;
border-right: black 1px dashed;
}
.Secondary_Data_Row {}
tr.Secondary_Data_Row td
{
height:10px;
border-bottom:black 1px solid;
background-color:whitesmoke;
font-size: 11px;
color: black;
font-family: Verdana;
border-right: black 1px dashed;
}
tr.Mouse_Over_Data_Row td
{
cursor:hand;
background-color:orange;
font-size: 11px;
color: blue;
text-decoration: underline;
font-family: Verdana;
border-right: black 1px dashed;
}
</style>
</head>
<body>
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br
/>
<div style="border: 1px solid black;height:100px;overflow:
auto;width: 270px">
<table cellspacing="0" cellpadding="2" rules="all" border="1"
id="ctl00_msp_Content_Holder_hdr_Test"
style="border-collapse:collapse;">
<tr class="Header_Row">
<th scope="col">Tape Date</th><th
scope="col">Deal Name</th>
</tr>
<tr class="Primary_Data_Row"
onmouseover="this.className='Mouse_Over_Data_Row'"
onmouseout="this.className='Primary_Data_Row'">
<td style="width:100px;">2006-02-02</td><td
style="width:150px;">TESTING0</td>
</tr><tr class="Secondary_Data_Row"
onmouseover="this.className='Mouse_Over_Data_Row'"
onmouseout="this.className='Secondary_Data_Row'">
<td style="width:100px;">2006-02-03</td><td
style="width:150px;">TESTING1</td>
</tr><tr class="Primary_Data_Row"
onmouseover="this.className='Mouse_Over_Data_Row'"
onmouseout="this.className='Primary_Data_Row'">
<td style="width:100px;">2006-02-04</td><td
style="width:150px;">TESTING2</td>
</tr><tr class="Secondary_Data_Row"
onmouseover="this.className='Mouse_Over_Data_Row'"
onmouseout="this.className='Secondary_Data_Row'">
<td style="width:100px;">2006-02-05</td><td
style="width:150px;">TESTING3</td>
</tr><tr class="Primary_Data_Row"
onmouseover="this.className='Mouse_Over_Data_Row'"
onmouseout="this.className='Primary_Data_Row'">
<td style="width:100px;">2006-02-06</td><td
style="width:150px;">TESTING4</td>
</tr><tr class="Secondary_Data_Row"
onmouseover="this.className='Mouse_Over_Data_Row'"
onmouseout="this.className='Secondary_Data_Row'">
<td style="width:100px;">2006-02-07</td><td
style="width:150px;">TESTING5</td>
</tr><tr class="Primary_Data_Row"
onmouseover="this.className='Mouse_Over_Data_Row'"
onmouseout="this.className='Primary_Data_Row'">
<td style="width:100px;">2006-02-08</td><td
style="width:150px;">TESTING6</td>
</tr><tr class="Secondary_Data_Row"
onmouseover="this.className='Mouse_Over_Data_Row'"
onmouseout="this.className='Secondary_Data_Row'">
<td style="width:100px;">2006-02-09</td><td
style="width:150px;">TESTING7</td>
</tr><tr class="Primary_Data_Row"
onmouseover="this.className='Mouse_Over_Data_Row'"
onmouseout="this.className='Primary_Data_Row'">
<td style="width:100px;">2006-02-10</td><td
style="width:150px;">TESTING8</td>
</tr><tr class="Secondary_Data_Row"
onmouseover="this.className='Mouse_Over_Data_Row'"
onmouseout="this.className='Secondary_Data_Row'">
<td style="width:100px;">2006-02-11</td><td
style="width:150px;">TESTING9</td>
</tr><tr class="Primary_Data_Row"
onmouseover="this.className='Mouse_Over_Data_Row'"
onmouseout="this.className='Primary_Data_Row'">
<td style="width:100px;">2006-02-12</td><td
style="width:150px;">TESTING10</td>
</tr><tr class="Secondary_Data_Row"
onmouseover="this.className='Mouse_Over_Data_Row'"
onmouseout="this.className='Secondary_Data_Row'">
<td style="width:100px;">2006-02-13</td><td
style="width:150px;">TESTING11</td>
</tr><tr class="Primary_Data_Row"
onmouseover="this.className='Mouse_Over_Data_Row'"
onmouseout="this.className='Primary_Data_Row'">
<td style="width:100px;">2006-02-14</td><td
style="width:150px;">TESTING12</td>
</tr><tr class="Secondary_Data_Row"
onmouseover="this.className='Mouse_Over_Data_Row'"
onmouseout="this.className='Secondary_Data_Row'">
<td style="width:100px;">2006-02-15</td><td
style="width:150px;">TESTING13</td>
</tr><tr class="Primary_Data_Row"
onmouseover="this.className='Mouse_Over_Data_Row'"
onmouseout="this.className='Primary_Data_Row'">
<td style="width:100px;">2006-02-16</td><td
style="width:150px;">TESTING14</td>
</tr><tr class="Secondary_Data_Row"
onmouseover="this.className='Mouse_Over_Data_Row'"
onmouseout="this.className='Secondary_Data_Row'">
<td style="width:100px;">2006-02-17</td><td
style="width:150px;">TESTING15</td>
</tr><tr class="Primary_Data_Row"
onmouseover="this.className='Mouse_Over_Data_Row'"
onmouseout="this.className='Primary_Data_Row'">
<td style="width:100px;">2006-02-18</td><td
style="width:150px;">TESTING16</td>
</tr><tr class="Secondary_Data_Row"
onmouseover="this.className='Mouse_Over_Data_Row'"
onmouseout="this.className='Secondary_Data_Row'">
<td style="width:100px;">2006-02-19</td><td
style="width:150px;">TESTING17</td>
</tr><tr class="Primary_Data_Row"
onmouseover="this.className='Mouse_Over_Data_Row'"
onmouseout="this.className='Primary_Data_Row'">
<td style="width:100px;">2006-02-20</td><td
style="width:150px;">TESTING18</td>
</tr><tr class="Secondary_Data_Row"
onmouseover="this.className='Mouse_Over_Data_Row'"
onmouseout="this.className='Secondary_Data_Row'">
<td style="width:100px;">2006-02-21</td><td
style="width:150px;">TESTING19</td>
</tr>
</table>
</div>
</body>
</html>
Thank you in advance,
H

Feb 2 '06 #1
2 2710
MrCode2k wrote:
Hello,
Trying to do: I just want a table that I can scroll and that has fixed

headers.
Problem: I got it to work but when I added the onmouseover event it
didn't work anymore.


I don't think the problem has anything to do with the onmouseover - if
it did, the proper place to ask would be comp.lang.javascript. Even
after removing all the scripting, your 'fixed header' doesn't work for
me in any browser.

More likely your problem is CSS, in which case ask in
comp.infosystems.www.authoring.stylesheets

In the meantime, the table here seems to be what you are trying to
replicate:

<URL:http://www.imaputz.com/cssStuff/bigFourVersion.html>

[...]
--
Rob
Feb 3 '06 #2
Rob,

Thanks for your response.
The reason why the fixed header was not working was because the first
line was missing from the code. Sorry.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

If you copy and paste the HTML from the url you submited and the add an
onmouseover event to a row that you have to scroll to get to, you will
also see the problem that, I'm having.

Thanks,

H

Feb 3 '06 #3

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

Similar topics

2
by: Patrice | last post by:
There seems to be a bug with the events mouseOut and mouseOver of divs when their position is fixed : when you enter the div with the mouse, three events are fired in this order : over, out, over....
7
by: MrCode2k | last post by:
Hello, Trying to do: I just want a table that I can scroll and that has fixed headers. Problem: I got it to work but when I added the onmouseover event it didn't work anymore....
4
by: Amy | last post by:
I need some help. I have this table with alternate row colors. Class gray and class white. I have javascript that do highlight when mouseover row ... and onclick to select row and highlight it...
7
by: Kamal | last post by:
Hello all, I have a very simple html table with collapsible rows and sorting capabilities. The collapsible row is hidden with css rule (display:none). When one clicks in the left of the...
1
by: since | last post by:
I figured I would post my solution to the following. Resizable column tables. Search and replace values in a table. (IE only) Scrollable tables. Sortable tables. It is based on a lot...
6
by: Romulo NF | last post by:
Greetings again to everyone, Im back to show this grid componenet i´ve developed. With this grid you can show the data like a normal table, remove the rows that you need, add rows, import data,...
15
by: daniel2335 | last post by:
Hello people, I could do with a little help.. I have been piecing some code together to make a table with a fixed header and that has light up rows. I thought id got it but I notice when i scroll...
5
by: Romulo NF | last post by:
Greetings, I´m back here to show the new version of the drag & drop table columns (original script ). I´ve found some issues with the old script, specially when trying to use 2 tables with...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.