.click() event for div after page/filter/sort

.click() event for div after page/filter/sort

whoopeswhoopes Posts: 9Questions: 0Answers: 0
edited September 2010 in Bug reports
Sloppy coding aside ...

.click() events only seem to work when the table is put back into the state it loaded. Same phenomenon with IE as with Firefox. Breakpoints with Firebug don't even trigger. I'm quite a newbie and quite perplexed. Any help would be appreciated.

My javascript initialization;
[code]
$(document).ready(function() {
oTable = $('#ctl00_ContentPlaceHolder1_GridView1').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"bAutoWidth": true,
"iDisplayLength": 3,
"bSortClasses": false,
"bStateSave": false,
"aoColumns": [
/* RQ_ID */{"bSearchable": false, "bSortable": false },
/* RQ_ID */null,
/* REQUESTOR */null,
/* ENTERED_BY */null,
/* ENTR_DTT */null,
/* TOTAL_EST_REQ_AMT */{"bSearchable": false },
/* MANUAL */{"bSearchable": false },
/* VDE */{"bSearchable": false },
/* MRP */{"bSearchable": false }
]
});

$('.vde').click(function() {
var rqid = $(this).attr('id').split('_')[0];

if (confirm('Are you sure that you want to remove requisition ' + rqid + ' from Costpoint?') === true) {
DeleteRQ(rqid, 'V', this);
}else{
return false;
}

});
});
[/code]

My table:

[code]



 Rq IDReqEntered ByCP Received DateReq TotalMANUALVDEMRP



VR0000283DonnaDonna8/11/2010 8:49:28 AM630.00

VR0000284PhilPhil8/11/2010 8:49:29 AM683.11

VR0000304EdEd8/12/2010 4:00:01 PM0.01

VR0000305AnneAnne8/12/2010 4:00:02 PM0.01

VR0000306JeffJeff8/16/2010 3:54:13 PM3600.00





[/code]

Replies

  • allanallan Posts: 61,726Questions: 1Answers: 10,109 Site admin
    Have a look at the FAQ ( http://datatables.net/faqs ) entitled "My events don't work on the second page" (top right) :-)

    Allan
  • whoopeswhoopes Posts: 9Questions: 0Answers: 0
    Thank you for at least including a smiley face. I deserve to be beaten and a donation should be made and it has. Cheers!
  • allanallan Posts: 61,726Questions: 1Answers: 10,109 Site admin
    Heh - no problem at all. It's one of those ones that is easy if you know how, very frustrating if you don't :-)

    Allan
This discussion has been closed.