Deprecated: Function set_magic_quotes_runtime() is deprecated in /home4/mfoster/public_html/cb/forums/include/common.php on line 62

Warning: Cannot modify header information - headers already sent by (output started at /home4/mfoster/public_html/cb/forums/include/common.php:62) in /home4/mfoster/public_html/cb/forums/header.php on line 31

Warning: Cannot modify header information - headers already sent by (output started at /home4/mfoster/public_html/cb/forums/include/common.php:62) in /home4/mfoster/public_html/cb/forums/header.php on line 32

Warning: Cannot modify header information - headers already sent by (output started at /home4/mfoster/public_html/cb/forums/include/common.php:62) in /home4/mfoster/public_html/cb/forums/header.php on line 33

Warning: Cannot modify header information - headers already sent by (output started at /home4/mfoster/public_html/cb/forums/include/common.php:62) in /home4/mfoster/public_html/cb/forums/header.php on line 34
Cross-Browser.com / [xTableHeaderFixed] development of r7, was 'need tutorial'

Cross-Browser.com

X Library Forums

You are not logged in.

Announcement

New user registration is currently disabled.

  • Index
  •  » X Library
  •  » [xTableHeaderFixed] development of r7, was 'need tutorial'

#26 November 16, 2009 9:33:31 am

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: [xTableHeaderFixed] development of r7, was 'need tutorial'

I tried to implement the CSS above in a project at work, but it didn't work out well because my tables have no borders, everything in the thead has borders, and the td's in the tbody only have a top border - so I resorted to using border-collapse: collapse. I'll be adding xTableHeaderFixed to these pages soon. As a result of this I'll have to modify xTableHeaderFixed because it is a 100% Ajax app. I'll post more on this topic soon.

Offline

 

#27 November 16, 2009 3:08:18 pm

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: [xTableHeaderFixed] development of r7, was 'need tutorial'

I've noticed something strange about this object - it seems to make the whole page redraw when inserting the new header tables into the DOM. I gave those tables display:none in the CSS and that seemed to solve it... however at some point I have to set them to display:table and then it seems like the whole page redraws. It could be that this is related to my Ajax app, but I'm not sure. I'll follow-up on this when I can.

Offline

 

#28 November 24, 2009 1:50:37 pm

ppcr
New Member
Registered: November 24, 2009
Posts: 5

Re: [xTableHeaderFixed] development of r7, was 'need tutorial'

In xthf1.php, I replaced the lines

<script type='text/javascript' src='../x.js'></script>
<script type='text/javascript' src='../lib/xtableheaderfixed.js'></script>

with the line

<script type='text/javascript' src='xthf.js'></script>

As per your comment "You can use the above two lines or the following. 'xthf.js' is compressed,
and contains only the X functions needed by xTableHeaderFixed.", I expected the same result.

However, with xthf.js, the fixed header in Tables #1 and #3 is slightly shifted to the left so the headers do not perfectly match the position of the column below. It does this in Opera and Firefox, and the result is even worse in IE7.

Are you sure that xthf.js is equivalent to x.js + xtableheaderfixed.js ?

I you cannot reproduce this, I can send you screenshots.

Offline

 

#29 November 24, 2009 8:45:18 pm

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: [xTableHeaderFixed] development of r7, was 'need tutorial'

Hi ppcr, Welcome to the forums!

I think there have been some updates to the source file and the compressed file did not get recreated. I'm not at my desk right now - I'll check it out later or in the morning.

Thanks!

Offline

 

#30 November 24, 2009 11:33:29 pm

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: [xTableHeaderFixed] development of r7, was 'need tutorial'

I've recreated the compressed file (and renamed it xthf-cmp.js) and the two demos are now using it.

Offline

 

#31 November 25, 2009 4:25:06 pm

ppcr
New Member
Registered: November 24, 2009
Posts: 5

Re: [xTableHeaderFixed] development of r7, was 'need tutorial'

Great, thank you. I will try it out.

A small annoyance is this:
If the cells in <tr><td> include some very long text that needs scrolling
If the <tr><th> header in the table head is thick,
then pressing page down will hide the first few lines of text under the fixed header.

I do not know if I am clear, I will try a small drawing (number are line numbers of the text in the cell)


Initial screen:

+++++++++++++ screen top limit +++++++++++++
Thick FIXED HEADER
Thick FIXED HEADER continued...........
1.This is the beginning of text in the cell
2.text is very long
3.text is very long
...
30.text is very long
------------------------screen bottom limit ------------------
31.text is very long     <- Note: this part if off screen
32.text is very long
33.text is very long
34.text is very long
35.text is very long
36.text is very long

The actual result of pressing page down is this:



...
29.text is very long
30.text is very long
+++++++++++++ screen top limit +++++++++++++
Thick FIXED HEADER
Thick FIXED HEADER continued...........
33.text is very long
34.text is very long
35.text is very long
...
------------------------screen bottom limit ------------------

So lines 31 and 32 are hidden behind the header.


An ideal result would be this:
...
29.text is very long
30.text is very long
+++++++++++++ screen top limit +++++++++++++
Thick FIXED HEADER
Thick FIXED HEADER continued...........
31.text is very long
32.text is very long
33.text is very long
...
------------------------screen bottom limit ------------------


I hope that you get the picture.

I hope that you can improve your solution to accommodate this page down adjusting to the thickness of the fixed header.

Offline

 

#32 November 25, 2009 11:05:13 pm

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: [xTableHeaderFixed] development of r7, was 'need tutorial'

xTableHeaderFixed does not try to paginate the table - it does not control the scrolling. Its main concern is to get a copy of the thead to align vertically with the original thead - and it has proven to be very difficult to find a solution that works in all situations.

After re-reading your post, it made me realize something - when the container is a scrollable element (not the window) then positioning the fixed header above the container might be better than positioning it where it appears to be inside the container. Interesting idea - I'll have to think more about that. thanks!

Offline

 

#33 November 26, 2009 4:33:34 am

ppcr
New Member
Registered: November 24, 2009
Posts: 5

Re: [xTableHeaderFixed] development of r7, was 'need tutorial'

Thanks for your answer. So there is no way you are going to investigate how to automatically adjust the scrolling after a page down ? So be it.

Another point that may need slight improvement is that links inside cells, even hidden behind a fixed header, remain clickable despite being hidden.

For example, in your demo1, 3rd table, Group3, T3Col6, if you scroll to the bottom of the table so as to hide the  last row behind the header. Then you click on the header T3Col6. This will launch the link "Mozilla Developper Center", although this link is hidden.

Can this be avoided? I am asking this, because I will make my headers clickable with some javascript action, and this may bring some confusion (in effect clicking on a link that is hidden behind).

Offline

 

#34 November 29, 2009 2:13:44 pm

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: [xTableHeaderFixed] development of r7, was 'need tutorial'

So there is no way you are going to investigate how to automatically adjust the scrolling after a page down ?


That is not what I said. I was merely trying to point out that that is not the purpose of this object. I don't want to add more problems to this object when we still haven't solved the existing ones.

Regarding clicking links that are hidden behind the header - I do not see this effect in any browser I have. What browser are you using? For anyone else reading this, do you see this problem? if so, what browser are you using?

FYI for everyone - There is a problem in IE8 with this object. I haven't had a chance to follow-up on it.

Offline

 

#35 November 30, 2009 1:29:43 am

ppcr
New Member
Registered: November 24, 2009
Posts: 5

Re: [xTableHeaderFixed] development of r7, was 'need tutorial'

You are right, I did not notice that it was browser dependent. This actually occurs in Opera 10.00. It is so weird how behaviour can vary from one browser to an other.

Offline

 

#36 November 30, 2009 6:56:29 am

ppcr
New Member
Registered: November 24, 2009
Posts: 5

Re: [xTableHeaderFixed] development of r7, was 'need tutorial'

Could you make your script adjust the header location for nested tables?

For example, if inside a

<table id="container_table" class='xthf-site'>

I define this cell:

<table id="nested_table" class='xthf-green' cellSpacing='0'>
...
</table>

Your code works but when scrolling the nested table, its fixed header is displayed OVER the fixed header of the container table.
It would be more useful to display the fixed header of the nested table below the fixed header of the container table, so as to be able to see both headers.

Offline

 

#37 December 2, 2009 1:32:20 am

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: [xTableHeaderFixed] development of r7, was 'need tutorial'

Hi ppcr,

I had not thought about nested tables. You have a good point there. In a way, it ties in with an issue I ran into with using this object at work - that is, how the fixed header should be vertically offset depending on the table being in certain nested containers. I will be thinking about this. Thanks!

Offline

 

#38 December 11, 2009 1:28:43 pm

theseeker
Member
Registered: December 11, 2009
Posts: 24

Re: [xTableHeaderFixed] development of r7, was 'need tutorial'

This might be a dumb question, but is it possible to make this work inside of an AJAX updatepanel in asp.net? It works fine without it, but when I add in the necessary tags as follows:

<asp:ScriptManager ID="ScriptManager" runat="server" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
blah blah blah
</ContentTemplate>
</asp:UpdatePanel>

then the code to create the fixed headers doesn't seem to fire any longer.

Any thoughts? I know you don't use .net, but I thought you might at least have some insight into why this won't work. Thanks!

Offline

 

#39 December 12, 2009 6:24:43 pm

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: [xTableHeaderFixed] development of r7, was 'need tutorial'

Hi theseeker, Welcome to the forums!

It's not a dumb question at all, but I'm afraid I don't know anything about that, sorry. I would just have to guess...

1. Make sure the js files are getting loaded. perhaps put "alert('in file-name')" in the js file.

2. Make sure the onload listener is getting executed. Perhaps put "alert('in constructor')" in the xTableHeaderFixed constructor.

3. Make sure the table className is the same as the value passed to the xTableHeaderFixed constructor.

Hmmm... sorry I'm not much help with this. If I think of anything else I'll post it.

Offline

 

#40 December 12, 2009 11:28:51 pm

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: [xTableHeaderFixed] development of r7, was 'need tutorial'

Offline

 

#41 December 15, 2009 1:14:19 pm

theseeker
Member
Registered: December 11, 2009
Posts: 24

Re: [xTableHeaderFixed] development of r7, was 'need tutorial'

Thanks for the replies, Mike. I have checked to make sure everything is getting loaded and executed with alerts, and everything is working just fine.

The problem only occurs when I'm using a partial postback from a dropdown menu. Here's the page in question:

http://www.dmi.illinois.edu/cpdev_redesign/profile_test3.aspx

I've removed the AJAX UpdatePanel code from my page, and you can see (especially on IE) how the entire page must be redrawn. I'd really like to avoid that redraw if possible.

Maybe I'm just calling xTableHeaderFixed incorrectly? I was a little unclear from the examples exactly how I should call the constructor.

This is how I've been doing it:

<script type="text/javascript">
    xAddEventListener(window, 'load',
  function() {
      new xTableHeaderFixed('xthf', 'content');
  }, false
);
</script>

I came close to getting this to work with AJAX by doing this:

<script type="text/javascript">
    Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(PageLoaded)
    function PageLoaded(sender, args) {
        new xTableHeaderFixed('xthf', 'content');         
    }
</script>

The problem was that the table header from the previous selection continued to show, possibly because a new xTableHeaderFixed was created each time I selected a new unit or college from my dropdown.

Thanks again for your help with this. We are really excited about using this on our site!

Offline

 

#42 December 16, 2009 9:52:51 am

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: [xTableHeaderFixed] development of r7, was 'need tutorial'

I also ran into problems when trying to use this in an ajax app. Things have been extremely hectic - I'll try to get back to this when I can.

Offline

 

#43 December 16, 2009 9:53:42 pm

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: [xTableHeaderFixed] development of r7, was 'need tutorial'

I've started a page where I can experiment with this. I'll try to post something soon.

Offline

 

#44 December 17, 2009 1:16:02 am

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: [xTableHeaderFixed] development of r7, was 'need tutorial'

WooHoo! I think I've got it! Check out this new demo:

xTableHeaderFixed - Ajaxified!

There are some things I need to document for this, and clean up - but will later - right now I'm hitting the sack smile

Offline

 

#45 December 17, 2009 9:30:45 am

theseeker
Member
Registered: December 11, 2009
Posts: 24

Re: [xTableHeaderFixed] development of r7, was 'need tutorial'

Wow, very cool! We're not in a huge hurry, so we'll wait for the cleaned-up/documented version before implementing.

Thanks again.

Offline

 

#46 December 18, 2009 9:50:50 am

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: [xTableHeaderFixed] development of r7, was 'need tutorial'

It still has a little problem in IE8 - but other than that it's in pretty good shape. Note that it is not yet included in the download file. I'm trying to make a release - maybe in a week or two.

Offline

 

#47 December 18, 2009 12:01:50 pm

DaveMorton
Member
From: Carson City, NV
Registered: November 27, 2009
Posts: 49
Website

Re: [xTableHeaderFixed] development of r7, was 'need tutorial'

I've looked at the demos in nearly all of the browsers in my arsenal (Safari's giving me grief), and other than minor imperfections in alignment, they all work great. Here's what I see:

1.) In FF3.5, T3Col3 cells are 2 pixels larger than the header. The offsets are centered (1px left, 1px right).
2.) in IE8 and Opera 10.1, table 3's caption has a larger border-right than the headers/cells.
3.) in Opera 10.1 and in Chrome, table 1's caption is 1 pixel longer than it's header. The offset appears on the left edge.

These are VERY minor to me, in terms of appearance, since I place a lot more value in function over form. but I know that there are those who expect and demand perfection, so I thought I'd point it out.

Great work, Mike! big_smile

Last edited by DaveMorton (December 18, 2009 12:03:34 pm)


Safe, Reliable Insanity, since 1961!
http://www.geekcavecreations.com

Offline

 

#48 December 19, 2009 8:38:53 am

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: [xTableHeaderFixed] development of r7, was 'need tutorial'

Thanks very much, Dave!

Offline

 

#49 December 20, 2009 4:41:23 am

DaveMorton
Member
From: Carson City, NV
Registered: November 27, 2009
Posts: 49
Website

Re: [xTableHeaderFixed] development of r7, was 'need tutorial'

No problems, Mike. I can't expect someone to report back to me about their test-driving my pages, if I don't return the favor can I? big_smile


Safe, Reliable Insanity, since 1961!
http://www.geekcavecreations.com

Offline

 

#50 January 8, 2010 5:12:22 pm

theseeker
Member
Registered: December 11, 2009
Posts: 24

Re: [xTableHeaderFixed] development of r7, was 'need tutorial'

Hi Mike,

Did you make any changes to xTableHeaderFixed for Demo 3 (AJAX)? The reason I ask is that I'm currently using your xthf-cmp.js library which has at the top:

/* Built from X 4.19 by xag 0.01 beta on 25Nov09 */

If you did make changes for AJAX, would you be able to generate a new version of xthf-cmp.js when you have a chance?

Also, I'm trying to decipher how the AJAX example works. I see that you've called xAddEventListener differently, passing in "layout-hmenu' based on which table is chosen at the top. If I only have one table on my site, is there a simpler way to call xAddEventListener here?

Finally, can you explain a bit about how the requestTable and receiveTable functions work? Would those be necessary in my "one table" scenario?

Thanks again for all of the time you've put into this, it is a phenomenal effort!

Offline

 
  • Index
  •  » X Library
  •  » [xTableHeaderFixed] development of r7, was 'need tutorial'

Board footer

Powered by PunBB 1.2.15
Copyright © 2002–2005 Rickard Andersson

Expand Restore Select Format Eval Load