[jQuery] tablesorter ajax help

2009-12-16 Thread tjones
Hello,
I'm totally new to using Tablesorter, for the most part. I have used
it for static content and it's worked great. The problem I'm running
in to is I would like to use a popup menu to choose which table to
display but the sorting does not seem to work. It displays the table
but I cant sort and the zebra widget does not work. What can I do to
fix this.

Thanks,
tom

Here is my test code:

logdata.cfm (Main Page):

script type=text/javascript
$(document).ready(function() {
$(#genit).tablesorter( {widgets: ['zebra']} );
});
/script

cfquery datasource=#session.dbsource# name=qGetLogEventTypes
select distinct event_type from logdata
/cfquery

script src=includes/_selectLog.js/script
form
div
span
bSelect a Log Type:/b
/span
span
select name=Type onChange=showLogEvents(this.value)
option value=Select.../option
cfoutput query=qGetLogEventTypes
option value=#event_type##event_type#/option
/cfoutput
/select
/span
/div
/form
div id=logList 
/div

_getLogData.cfm:

cfquery datasource=#session.dbsource# name=qGetLogEvents
select event, event_type, date
from logdata
Where event_type like '#URL.type#'
Order By Date Desc
/cfquery

cfif qGetLogEvents.recordcount
table id=genit class=tablesorter border=0 cellpadding=0
cellspacing=0 width=100%
thead
tr
thDate/th
thType/th
thEvent/th
/tr
/thead
tbody
cfoutput query=qGetLogEvents
tr
td#date#/td
td#event_type#/td
td#event#/td
/tr
/cfoutput
/tbody
/table
/cfif

_selectLog.js:

var oXmlHttp

function showLogEvents(str)
{
var url=includes/_getLogData.cfm?type= + str
oXmlHttp=GetHttpObject(stateChanged)
oXmlHttp.open(GET, url , true)
oXmlHttp.send(null);
}

function stateChanged()
{
if (oXmlHttp.readyState==4 || oXmlHttp.readyState==complete) {

document.getElementById(logList).innerHTML=oXmlHttp.responseText;
}
}

function GetHttpObject(handler)
{
try
{
var oRequester = new XMLHttpRequest();
oRequester.onload=handler
oRequester.onerror=handler
return oRequester
}
catch (error)
{
return false;
}
}


[jQuery] jquery tablesorter and exclude a href from sort

2008-11-24 Thread tjones

Hello,
I have just started to use the jquery tablesorter and really like it.
Since I'm really new to jquery can someone tell me if there is a
parser or something that will allow me to sort a column which has a
href... in it.

Thanks,
tom

Example...
tda href=index.cfm?groupinfo=#name#img src=images/info.png
height=16 width=16 align=texttop/a#name#/td