Navigation not working in IE 7/8
Navigation not working in IE 7/8
wcmanes
Posts: 19Questions: 1Answers: 0
Hi Allan,
First, thank you for you wonderful tool and all the time you give so generously to help people with it.
We are having a problem where the navigation buttons do not work in IE 7/8, but seem to work fine in all other browsers. We are using the latest beta of 1.5 (beta 11) and we have the same problem with several pages. I know these type problems are usually due to HTML issues, so I have made sure this particular page passes W3C validation with no errors at all.
The URL is: http://ragsmdev.ucr.edu/agsmevents/index.php
I can see that the button event is firing and something happens, as the page redraws, but it simple does not advance to the next page of data in the table.
Thank you again,
Bill Manes
UC Riverside
First, thank you for you wonderful tool and all the time you give so generously to help people with it.
We are having a problem where the navigation buttons do not work in IE 7/8, but seem to work fine in all other browsers. We are using the latest beta of 1.5 (beta 11) and we have the same problem with several pages. I know these type problems are usually due to HTML issues, so I have made sure this particular page passes W3C validation with no errors at all.
The URL is: http://ragsmdev.ucr.edu/agsmevents/index.php
I can see that the button event is firing and something happens, as the page redraws, but it simple does not advance to the next page of data in the table.
Thank you again,
Bill Manes
UC Riverside
This discussion has been closed.
Replies
That's a good one! I can honestly say, I don't have a clue what is causing the problem - sorry! If I had to guess, I would say that there is another event handler on the element, and that is capturing the click and then throwing it away before DataTables can see it. I'm going to be updating my Visual Event tool for jQuery.live() and IE soon (tonight if I get the time) and that would answer that question...
I see you have a lot of JS libraries being loaded on that page. What happens if you strip everything out apparent from jQuery and DataTables? Does the problem still occur?
Regards,
Allan
Thanks for taking a look. It really is amazing how much you do to support DataTables.
Bill
I like the "auto resize" functionality, but looks like it's coming out :(
Bill
next - sometimes worked sometimes not
next - always works
Don't know if it's in your case, but maybe someone will make use of it.
Interesting - but a good find!
There is an easier way of resizing the table automatically, and without Javascript. What to do is set bAutoWidth to false during initialisation and in your HTML, give each of the TH elements a % width. That way the browser will do all the hard work for you :-)
Regards,
Allan
Near as I can tell, any action that causes DataTables to update in the table display (filter, navigation, etc.) makes IE fire a window resize event. This does not occur in other browsers. I have a window resize event handler that changes the width of the table and then redraws:
$("#eventlist").css("width",winWidth + "px");
oTable.fnDraw()
Of course this resets the table back to the 1st page (not great). I fixed the basic problem by checking that the width of the window actually did change before resizing it:
if (Math.abs(winWidth - lastWidth) >= 20) {
lastWidth = winWidth;
$("#eventlist").css("width",winWidth + "px");
oTable.fnDraw();
}
This works, but does have an unintended down side. If the user has navigated to a page other than the 1st page, the fnDraw method puts him back on the 1st page. Is there any way to get fnDraw to redraw but at the same list location?
Yes it's possible to keep the paging at the same place after a draw, but it involved an extra step. You need to record what page you are currently on, then do the draw, and finally jump back to the required page (it's so fast the user will never see it).
See this conversation for details:
http://datatables.net/forums/comments.php?DiscussionID=422
Allan