Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

Joshua Ewart

Greenhorn
+ Follow
since Jan 02, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Joshua Ewart

Just a warning: Expressions in CSS can have very bad performance with IE.

Eric



Agreed. Which is why I'm making this change.

Pretty nifty suggestion for that changeClassTest function, Eric.

Unfortunately, I'm working with a VERY large dataset, and even if I cache the elements it's horrendously slow...
Also, I'd need to modify all of my pages that are doing validation to implement it.

Again, that's for the input. I just wish I need why changing the className was causing IE to flip the heck out...
Thanks for the reply, Eric.

As I said, it appears as if IE forgets to reset the top position after the inner styles get updated.

And it's an internal company website, so I only need to support IE7. Did you remember to change onblurMeth to onblur?

Also, I have looked at that website multiple times. It does not appear to work in IE7.

Again, thanks for taking the time to look at this.
Hey folks.

First time poster, be gentle with me.

I am currently having an issue with an internal webiste that has been causing me considerable grief.

I have tables with fixed header rows that are working well, with one very irritating exception.

We use an method on our text boxes to perform validation.

If the field has an error, we change the color of the text box to represent this. If the field is fine, we set it to the original color it was before we flagged it as an error. Pretty normal, right?

Well, this is when things get interesting. If the user scrolls down any amount in the table, and then clicks in and then out of the field, triggering the onblur, the fixed header jumps right out of the table. It's as if the top value is being set to where it WOULD have been in the table had the position not been set to relative. Further scrolling will not move the header from it's position on the page, until the onblur triggers again, with the header moving to a different position.

The problem is not with the onblur event or the text boxes. I have placed a button outside of the table and container div, and used it to cause the same problem by changing the class of a tr or td.

Some more background info before I post code.
  • 1 It only occurs in IE7. (The only browser I need to support.)
  • 2 I know a way to fix the problem using an expression involving scrollTop on the headerRow, but I'd like to avoid it for performance reasons.
  • 3 The table MUST be variable width.
  • 4 I absolutely need to set a class, and not set individual styles. I have 100+ pages that use the validation classes in the js validation routines.
  • 5 The outer table is only there to force the container div to be the width of the scrolling table.


  • Here's the code. Sorry for the size. Make sure to change onblurMeth to onblur before trying this sample.