|
Hi, I have a page with a complex table structure used to present the page with graphical elements, when I put your code into it using images in my table elements, I can only get the header and the footer elements to display, but not the images in the table body. I even pasted your sample demo page table into my page and have the same results, no data only footers and headers. You can email me and I can give you a url to see the page in action if that will help. I presume it is something else in the page that is inhibiting the behavior
Peter Black
pblack@taracom.com
|
|
|
|
|
I just found the solution, it is much simpler to dump the entire jscript code, and just wrap your table with the following, and it works perfectly for vertical scrollbars. I haven't yet tried it with horizontal but it should work if you set the width value properly. Here is the code
Somedata or images here | Somedata or images here | Somedata or images here | Somedata or images here | Somedata or images here |
Thanks for the code anyway, it is always interesting to see how people find solutions to problems.
Peter Black
pblack@taracom.com
|
|
|
|
|
hi,
i want a horizantal scrollbar as well as vertical scrollbar in scrollable table.
Amita
|
|
|
|
|
|
Hi,
How do I disable horizontal scroll and only allow vertical scroll? Also I get a blank space between the thead and the tbody, any clues on how to get rid of that?
Thanks in advance,
-Akshay
|
|
|
|
|
That was the same thing I was looking for, i can't find it anywere
|
|
|
|
|
for this question
>> How do I disable horizontal scroll and only allow vertical scroll
I think you should check this code
container[c].style.width = tbl.clientWidth + 2 * tbl.clientLeft + scrollbarWidth();
with this code, the width of this container is OK for your table.
If the horizontal scroll is showed, then because of somes reasons, for exemple, margin of you table > 0
hope it helps
Hai NGUYEN
|
|
|
|
|
how does one print just that table?
|
|
|
|
|
I plan to re-render the page in "printable" format by simply leaving on the onload call.
--mke
|
|
|
|
|
This is a great script! I was just wondering why my column headings are not aligned properly with my table data. I'm not using the 'width' property but is anything else causing this weirdness?
TIA,
Andy
|
|
|
|
|
Nevermind... It works fine after removing 'COLS' from
Thanks again for this great code!
Andy
|
|
|
|
|
It does not work if you have one or more cells in table header with colspan.
One way to avoid is to add a blank row, now border, transparent background at the top of the table header.
Brajagopal Bhar
|
|
|
|
|
|
I have found a real bug in this scrollable table, if you put any input's inside the table, then the data is doubled, with the inial value and the value you entered in, if you can fix that it would be great.
|
|
|
|
|
I had the same problem, but it appears only to happen (for me) if i have input fields in the footer. Haven't tested the header yet. Otherwise, this bit of code worked really well for me, absolutely love it. Thanks!
|
|
|
|
|
Hi. I have populated my table dynamically from a database. This has caused the scrollable portion of the table to appear with blank lines at the top of the table and the user has to scroll down to see the first table entry.
Can you tell me if there is any way to get the table to display correctly?
|
|
|
|
|
Hi,
I implemented something like this a different way. It was for a very wide table (wider than the screen width); the data included many rows.
Unfortunately, to scroll the table data a user needed to get to the scrollbar on the right. Do you know of any way to put the scrollbar on the left side of the table, or both on the left and right? I couldn't find a way to do that.
Thanks for any help you may be able to provide - Bill C
Bill C
|
|
|
|
|
You can take any element and specify attribute dir=rtl.
|
|
|
|
|
This is excellent code for a scrollable HTML table. When I use it in my code, I encounter a little problem -- the cells in tHead are no more lined up with the cells in tBody. I only use the vertical scroll bar. Can anyone help? Thanks.
brian qing
|
|
|
|
|
Check out the comment above: (here). It happens when you use cols in your <table>, or as I've seen, colspan in any of your cell tags in the first row. This happens because the author calculates all the widths off the first row. Either put in an empty and invisible first row <tr style="display:none">, or change out any colspans with empty cells.
|
|
|
|
|
Is there way to scroll the table in the example using scrollBy or scrollTo methods? Or maybe is there any other way to scroll this table? How can I by clicking button (Last) get to last record or button (First) get to first record?
|
|
|
|
|
Can any one give one sample code for "vertical & horizontal" scrolling both without heading scrolling.
|
|
|
|
|
IT is a very good code, but you can do it excepcionally, if you implemment sort columns, and posibility to use in two diferents table in same page. Sorry for my English
|
|
|
|
|
I'm generating rows in the table based on a dynamic sql statement.
If there are no in the table a runtime error occures in function fixTableWidth. I have added the following line in the makescrollableTable function to check on the length of rows collection in the tbl.tBodies object.
function makeScrollableTable(tbl,scrollFooter,height){
var c, pNode, hdr, ftr, wrapper, rect;
if (typeof tbl == 'string') tbl = document.getElementById(tbl);
pNode = tbl.parentNode;
if (tbl.tBodies[0].rows.length == 0) return; // there are no rows in the table so jump out now
fixTableWidth(tbl);
|
|
|
|
|