 |
|
 |
Hi,
I am using master page.
So when I call the function in '"<div onload="makeScrollableTable('tabela',true,'auto');"'
It do not work.
Now what ?
modified on Saturday, May 30, 2009 5:59 AM
|
|
|
|
 |
|
 |
Hey Guys check this for complete scrollable table... This has fixed right and fixed left column and it is configurable.
See this http://www.s7u.blogspot.com
|
|
|
|
 |
|
 |
I'm trying to use this code on a table that is being created dynamically in JavaScript and have run into a couple of problems. First, if I rebuild the table in code the scroll bars go away and I get a long, multi-page table. I traced this to the fact that the second time through the ScrollableTable code the container array has 2 occurrences (even though it's for the same table), causing the else condition of this code to be executed (where c is the array occurrence count):
if (c == 0 && height == 'auto'){
onResizeAdjustTable();
onResizeHandler = window.onresize;
window.onresize = onResizeAdjustTable;
}else{
container[c].style.height = height;
}
I modified the function to allow me to pass in the value for c and this works as far as making the table scrollable (the if condition is executed), but after only a few iterations through this code an "out of stack space" error results because the following line of code is executed over & over again:
if (onResizeHandler) onResizeHandler();
How can I get around this? FYI, I'm not a JavaScript expert. .Net & SQL are my areas of expertise and I'm learning JavaScript as I go along for this project.
Thanks very much for any assistance anyone might be able to provide.
|
|
|
|
 |
|
 |
Great script, thanks!
One small change I made was to adjust widths in all lines of the table body, not just the first. Otherwise the first line was aligned correctly, the following lines were shifted to the right when no scrollbar was present and to the left with a scrollbar present.
Here's an updated function fixTableWidth():
function fixTableWidth(tbl){
for (var i=0; i < tbl.tHead.rows.length; i++) {
findRowWidth(tbl.tHead.rows[i].cells);
}
for (var i=0; i < tbl.tBodies[0].rows.length; i++) {
findRowWidth(tbl.tBodies[0].rows[i].cells);
}
if (tbl.tFoot) {
for (var i=0; i < tbl.tFoot.rows.length; i++) {
findRowWidth(tbl.tFoot.rows[i].cells);
}
}
for (var i=0; i < tbl.tHead.rows.length; i++) {
setRowWidth(tbl.tHead.rows[i].cells);
}
for (var i=0; i < tbl.tBodies[0].rows.length; i++) {
setRowWidth(tbl.tBodies[0].rows[i].cells);
}
if (tbl.tFoot) {
for (var i=0; i < tbl.tFoot.rows.length; i++) {
setRowWidth(tbl.tFoot.rows[i].cells);
}
}
}
|
|
|
|
 |
|
 |
Since the width for the table and the rows are calculated in the Javascript, I am facing issues . I need to open the same table HTML in a window for print. Since the width for the table is in pixels, the print page is showing a horizontal scrollbar.
Can I update the Javascript to use percentages in place of pixels.
S
|
|
|
|
 |
|
 |
Hi
Great job with this script.
But have a bug with input in footer.
We try to change an input dynamically with document.forms[0].elements['XX'].value='3' . When then we do alert(document.forms[0].elements['XX'].value) the value is correct, but on the screen there is the initial value.
Did someone resolved this ?
thanks
Titus
|
|
|
|
 |
|
 |
I have used this script in IE it works fine for vertical scroll, but I am not getting Horizontal scroll. Can you please help me in this regard?
Thanks
Mani
|
|
|
|
 |
|
 |
I am building a table that loads data form DOM. I have a dropdownlist to populate the table. It works fine without the scrollbar.
The first time that i load the table it also works fine, but when i load in new data to the table the scrollbar do not disapear and the header stays. Is there anyway to remove the scrollbar and load it again? I have tried to make a new function in scrollableTable to delete it but I haven`t manage to get i to work.
Please help!!
|
|
|
|
 |
|
 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
When I have the above page declaration the scrollbars don't show.
Does anyone else experience this?
Thanks!
Rick-N-Roll
|
|
|
|
 |
|
|
 |
|
 |
I am getting a problem somewhere in fix table with. The javascript error is 'Object Not found'
Chris Lasater
http://www.geocities.com/lasaterconsult
|
|
|
|
 |
|
|
 |
|
 |
hi
plz tell me yha procedure to implement the table on html documnet throuht javascript and plz plz also tell me the procedure to create link with database or MsExcel
thanks
|
|
|
|
 |
|
 |
g'day..
first of all this is a great script... I just wanted to now how can i make the table scrollable horizontally... also if possible, hold few cols and scroll the rest..
is this possible with this ScrollableTable script.. if not than can some one tell me few ideas on how i can get this done..
thanks in advance.
|
|
|
|
 |
|
 |
Script works fine with IE. but doesn't work with netscape or Mozzila FireFox. Please help.
|
|
|
|
 |
|
 |
| For mozila support, add style="overflow: auto; height:380px;" in |
|
|
|
 |
|
 |
I added what you said, and it worked, however, now I have a horizontal scrollbar where one is not desired and the right side scrollbar overlaps the table information.
Do you know how to fix this?
Thanks.
Sorry for the ping on an old topic, guess that's what happens when you have to do something new the first time!
|
|
|
|
 |
|
 |
Add style="overflow: auto; height:380px;" in what / where?
|
|
|
|
 |
|
 |
can anyone help me to run this script on fierfox because it does not work.
thanks in advance
|
|
|
|
 |
|
 |
Did you ever figure out what/where? I am having the same issue and would like to know the answer.
|
|
|
|
 |
|
 |
I am having so much trouble with implementing a scrollbar using this code. My program won't run and stops at the line:
function fixTableWidth(tbl){
for (var i=0; i < tbl.tHead.rows.length; i++) findRowWidth --> It stops here at tbl.tHead.rows.length it says there is no object required.
I know it says the table header has to be defined in TBODY , im not sure what this means or if it has anything to do with the reason the code isn't working. I did try putting | in | but that didn't work.
Please help.
|
|
|
 |
|
 |
first : THANKS You
the file contains:
"// To enable the sorting, simply include this javascript source file and
// add an onLoad event to the <body> like below:
//
// <body önLoad="makeScrollableTable('table1',false,'auto');makeScrollableTable('table2',false,100); ..."> "
¿This code will sort the columns?
sorry, i don't know english
|
|
|
|
 |
|
 |
Can you please change your scrip so it will support Firefox.
I love the script, it works great! I'll be happy to contribute financially - about $100.
|
|
|
|
 |
|
 |
| For mozilla support, add style="overflow: auto; height:380px;" in |
e.g
Change height accordingly.
|
|
|
 |
|
 |
This is working great in Explorer for me, but in Mozilla I'm not getting a scrollbar to appear - has anyone else come across this problem - and if so, did they manage to solve it?
|
|
|
|
 |