IE7 Regex Issues
IE7 Regex Issues
Hello,
I've been working with DataTables, which has been a very enjoyable experience (well done!), but I believe I have run across a snag I can't quiet solve. I've been playing around with the filtering and had got a stable version that works in FF, Chrome, and IE8. One column in the table has a 'status' that I'm trying to filter on.
My method so far has been:
[code]
var index;
var filter;
/* this will always return the column index that contains the status, as my column count can change */
index = $('.DataTable-Header-Status').attr('cellIndex');
/* the href attribute is tied to another object where I am storing the filters for that object */
filters = $(this).attr('href');
$dTable.fnFilter(filters, index, true, false, false);
[/code]
So, on click of the object that applies a filter to the table, I'm grabbing the index of the 'status' column and getting the filter for the status, then applying that filter to the status column in my datatables instance.
The filter that is returned from the object looks like: '^status1$|^status2$'.
So I might have three statuses: ['Test', 'Test Start', 'Test Complete'], and my filter might look like '^Test$', which would match the first element in the list of statuses. (If I've got my regex strait, which has been another fun adventure!)
Now when I run this in IE8, FF, and Chrome, it works flawlessly. But in IE 7 (let me clarify, I'm running IE8 in IE7 mode to test) and it is not matching any of the elements. I thought it might be an issue with the regex filter, but I used the console to do simple string tests and the format worked fine. I've tested everything I can think of (including triming all my strings to make sure no white space I could find was bothering it).
Do you know of any possible reasons that might be causing my regex to fail in IE7??
Thank you for your time and assistance!
And thank you for building such a wonderful utility. Keep up the great work!
I've been working with DataTables, which has been a very enjoyable experience (well done!), but I believe I have run across a snag I can't quiet solve. I've been playing around with the filtering and had got a stable version that works in FF, Chrome, and IE8. One column in the table has a 'status' that I'm trying to filter on.
My method so far has been:
[code]
var index;
var filter;
/* this will always return the column index that contains the status, as my column count can change */
index = $('.DataTable-Header-Status').attr('cellIndex');
/* the href attribute is tied to another object where I am storing the filters for that object */
filters = $(this).attr('href');
$dTable.fnFilter(filters, index, true, false, false);
[/code]
So, on click of the object that applies a filter to the table, I'm grabbing the index of the 'status' column and getting the filter for the status, then applying that filter to the status column in my datatables instance.
The filter that is returned from the object looks like: '^status1$|^status2$'.
So I might have three statuses: ['Test', 'Test Start', 'Test Complete'], and my filter might look like '^Test$', which would match the first element in the list of statuses. (If I've got my regex strait, which has been another fun adventure!)
Now when I run this in IE8, FF, and Chrome, it works flawlessly. But in IE 7 (let me clarify, I'm running IE8 in IE7 mode to test) and it is not matching any of the elements. I thought it might be an issue with the regex filter, but I used the console to do simple string tests and the format worked fine. I've tested everything I can think of (including triming all my strings to make sure no white space I could find was bothering it).
Do you know of any possible reasons that might be causing my regex to fail in IE7??
Thank you for your time and assistance!
And thank you for building such a wonderful utility. Keep up the great work!
This discussion has been closed.