Undefined/Null reference error in IE8 (I'm stuck)

Undefined/Null reference error in IE8 (I'm stuck)

mwehrlymwehrly Posts: 2Questions: 0Answers: 0
edited July 2013 in DataTables 1.9
Hello all -
I am in a pickle and could use some help identifying where my code is going awry. The page functions as intended in all browsers/all versions with the exception of IE8. Here is the demo: https://dl.dropboxusercontent.com/u/12535872/tbl/tbl/index.html

This is what I have building the table (there is a little validation going on in there too)
[code]
$(document).ready(function(){
$('body', window.parent.document).append('');
var oTable = $('#tbl').dataTable({
"bPaginate":true,
"bFilter":false,
"bSort":true,
"aoColumns": [
{"bSortable":false},
null,
null,
null,
null,
null,
null,
{"bVisible":false},
{"bVisible":false},

],
});

$('#tbl tbody td:nth-child(1)').each(function(){
$(this).addClass('plus');
});

$('td.plus').click(function(){
var nTr = $(this).parents('tr')[0];
if ( oTable.fnIsOpen(nTr) )
{
/* This row is already open - close it */
$(this).html("[+]");
oTable.fnClose( nTr );
}
else
{
/* Open this row */
$(this).html("[-]");
oTable.fnOpen( nTr, fnFormatDetails(oTable, nTr), 'details' );
}
});
$('.epr').click(function(){
var nTr = $(this).parents('tr')[0];
var aData = oTable.fnGetData( nTr );
var popup_html = aData[8];
$('#popup_div', window.parent.document).html(popup_html);
window.parent.jQuery('#popup_div').bPopup();
$('.req_epr', window.parent.document).click(function(){

var company = $(this).parent().children('.company').val();
var full_name = $(this).parent().children('.fullname').val();
var office_number = $(this).parent().children('.offnum').val();
var cell_number = $(this).parent().children('.cellnum').val();
var email_address = $(this).parent().children('.email').val();
var email_address_confirm = $(this).parent().children('.emailconf').val();
var trade = $(this).parent().children('.trade').val();
var toc = $(this).parent().children('.toc').is(':checked');
var valid = 1;
if(!company){
valid=0;
$(this).parent().children('.company').css('border-color','red');
}else{
$(this).parent().children('.company').css('border-color','#BFBFBF');
}
if(!full_name){
valid=0;
$(this).parent().children('.fullname').css('border-color','red');
}else{
$(this).parent().children('.fullname').css('border-color','#BFBFBF');
}
if(!office_number){
valid=0;
$(this).parent().children('.offnum').css('border-color','red');
}else{
$(this).parent().children('.offnum').css('border-color','#BFBFBF');
}
if(!cell_number){
valid=0;
$(this).parent().children('.cellnum').css('border-color','red');
}else{
$(this).parent().children('.cellnum').css('border-color','#BFBFBF');
}
if(!email_address){
valid=0;
$(this).parent().children('.email').css('border-color','red');
}else{
$(this).parent().children('.email').css('border-color','#BFBFBF');
}
if(!email_address_confirm){
valid=0;
$(this).parent().children('.emailconf').css('border-color','red');
}else{
$(this).parent().children('.emailconf').css('border-color','#BFBFBF');
}
if(!trade){
valid=0;
$(this).parent().children('.trade').css('border-color','red');
}else{
$(this).parent().children('.trade').css('border-color','#BFBFBF');
}
if(!toc){
valid=0;
$(this).parent().children('.tocl').css('background-color','red');
}else{
$(this).parent().children('.tocl').css('background-color','transparent');
}
if(!valid){return;}
if(email_address != email_address_confirm){$(this).parent().children('.emailconf').css('border-color','red');return;}

$(this).parents('form').trigger('submit');

});
});



});

$('#parentPrice', window.parent.document).html();

function fnFormatDetails ( oTable, nTr )
{
var aData = oTable.fnGetData( nTr );
return aData[7];
}
[/code]

Any help would be greatly appreciated.

m

Replies

  • mwehrlymwehrly Posts: 2Questions: 0Answers: 0
    bump... no thoughts?
  • allanallan Posts: 63,383Questions: 1Answers: 10,449 Site admin
    You've got trailing commas in a number of places. Old IE versions don't like that...

    Allan
This discussion has been closed.