I'm still trying to get this working, has anybody tried anything like
this before?

On Dec 15, 6:16 pm, livewire9174 <markmch...@gmail.com> wrote:
> here is the code, I need to stop the execution somewhere I guess ? I
> am using ajax calls to put data into to table, so I guess I cant
> attach the tablesorter script until the ajax calls have fully
> finished ?
>
> [code]
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
> "http://www.w3.org/TR/html4/loose.dtd";>
> <?php
> header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
>
> // always modified
> header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
>
> // HTTP/1.1
> header("Cache-Control: no-store, no-cache, must-revalidate");
> header("Cache-Control: post-check=0, pre-check=0", false);
> header("Cache-Control: public");
> // HTTP/1.0
> header("Pragma: no-cache");
>
> session_start();
> ?>
> <head>
> <title></title>
> <script type="text/javascript" src="jquery-latest.js"></script>
>
> <script type="text/javascript">
> function ajaxFunction()
>
> {
>
>   var xmlHttp=null;
> try
>   {
>
>   // Firefox, Opera 8.0+, Safari
>   xmlHttp=new XMLHttpRequest();
>   xmlHttp1=new XMLHttpRequest();
>   xmlHttp2=new XMLHttpRequest();
>   xmlHttp3=new XMLHttpRequest();
>   xmlHttp4=new XMLHttpRequest();
>   xmlHttp5=new XMLHttpRequest();
>   xmlHttp6=new XMLHttpRequest();
>   xmlHttp7=new XMLHttpRequest();
>    xmlHttp8=new XMLHttpRequest();
>   }
> catch (e)
>   {
>   // Internet Explorer
>   try
>     {
>     xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
>         xmlHttp1=new ActiveXObject("Msxml2.XMLHTTP");
>         xmlHttp2=new ActiveXObject("Msxml2.XMLHTTP");
>         xmlHttp3=new ActiveXObject("Msxml2.XMLHTTP");
>         xmlHttp4=new ActiveXObject("Msxml2.XMLHTTP");
>         xmlHttp5=new ActiveXObject("Msxml2.XMLHTTP");
>         xmlHttp6=new ActiveXObject("Msxml2.XMLHTTP");
>         xmlHttp7=new ActiveXObject("Msxml2.XMLHTTP");
>         xmlHttp8=new ActiveXObject("Msxml2.XMLHTTP");
>     }
>   catch (e)
>     {
>     try
>       {
>       xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
>           xmlHttp1=new ActiveXObject("Microsoft.XMLHTTP");
>           xmlHttp2=new ActiveXObject("Microsoft.XMLHTTP");
>           xmlHttp3=new ActiveXObject("Microsoft.XMLHTTP");
>           xmlHttp4=new ActiveXObject("Microsoft.XMLHTTP");
>           xmlHttp5=new ActiveXObject("Microsoft.XMLHTTP");
>           xmlHttp6=new ActiveXObject("Microsoft.XMLHTTP");
>       xmlHttp7=new ActiveXObject("Microsoft.XMLHTTP");
>           xmlHttp8=new ActiveXObject("Microsoft.XMLHTTP");
>
>           }
>     catch (e)
>       {
>       alert("Your browser does not support AJAX!");
>       return false;
>       }
>     }
>   }
>
>     xmlHttp.onreadystatechange=function()
>     {
>     if(xmlHttp.readyState==4)
>       {
>
>            document.getElementById('resulta').innerHTML =
> xmlHttp.responseText;
>           document.getElementById('showMessagea').style.display='none';
>       }
>     }
>
>   xmlHttp1.onreadystatechange=function()
>     {
>     if(xmlHttp1.readyState==4)
>       {
>            document.getElementById('resultb').innerHTML =
> xmlHttp1.responseText;
>
>           document.getElementById('showMessageb').style.display='none';
>       }
>     }
>
> xmlHttp2.onreadystatechange=function()
>     {
>     if(xmlHttp2.readyState==4)
>       {
>            document.getElementById('resultc').innerHTML =
> xmlHttp2.responseText;
>           document.getElementById('showMessagec').style.display='none';
>       }
>     }
>
> xmlHttp3.onreadystatechange=function()
>     {
>     if(xmlHttp3.readyState==4)
>       {
>            document.getElementById('resultd').innerHTML =
> xmlHttp3.responseText;
>           document.getElementById('showMessaged').style.display='none';
>       }
>     }
>
> xmlHttp4.onreadystatechange=function()
>     {
>     if(xmlHttp4.readyState==4)
>       {
>            document.getElementById('resulte').innerHTML =
> xmlHttp4.responseText;
>           document.getElementById('showMessagee').style.display='none';
>       }
>     }
>
>         xmlHttp5.onreadystatechange=function()
>     {
>     if(xmlHttp5.readyState==4)
>       {
>            document.getElementById('resultf').innerHTML =
> xmlHttp5.responseText;
>           document.getElementById('showMessagef').style.display='none';
>       }
>     }
>
>         xmlHttp6.onreadystatechange=function()
>     {
>     if(xmlHttp6.readyState==4)
>       {
>            document.getElementById('resultg').innerHTML =
> xmlHttp6.responseText;
>           document.getElementById('showMessageg').style.display='none';
>       }
>     }
>
>         xmlHttp7.onreadystatechange=function()
>     {
>     if(xmlHttp7.readyState==4)
>       {
>            document.getElementById('resulth').innerHTML =
> xmlHttp7.responseText;
>           document.getElementById('showMessageh').style.display='none';
>       }
>     }
>
>         xmlHttp8.onreadystatechange=function()
>     {
>     if(xmlHttp8.readyState==4)
>       {
>            document.getElementById('resulti').innerHTML =
> xmlHttp8.responseText;
>           document.getElementById('showMessagei').style.display='none';
>       }
>     }
>
>   xmlHttp.open("GET","http://www.xxxxxxxx.com/1.php",true);
>   xmlHttp.send(null);
>   document.getElementById('showMessagea').style.display='';
>
>   xmlHttp1.open("GET","http://www.xxxxxxxx.com/12.php",true);
>   xmlHttp1.send(null);
>   document.getElementById('showMessageb').style.display='';
>
>   xmlHttp2.open("GET","http://www.xxxxxxxx.com/122.php",true);
>   xmlHttp2.send(null);
>   document.getElementById('showMessagec').style.display='';
>
>   xmlHttp3.open("GET","http://www.xxxxxxxx.com/123232.php",true);
>   xmlHttp3.send(null);
>   document.getElementById('showMessaged').style.display='';
>
>  xmlHttp4.open("GET","http://www.xxxxxxxx.com/1323.php",true);
>   xmlHttp4.send(null);
>   document.getElementById('showMessagee').style.display='';
>
>  xmlHttp5.open("GET","http://www.xxxxxxxx.com/123123.php",true);
>   xmlHttp5.send(null);
>   document.getElementById('showMessagef').style.display='';
>
>  xmlHttp6.open("GET","http://www.xxxxxxxx.com/123123.php",true);
>   xmlHttp6.send(null);
>   document.getElementById('showMessageg').style.display='';
>
>  xmlHttp7.open("GET","http://www.xxxxxxxx.com/1231.php",true);
>   xmlHttp7.send(null);
>   document.getElementById('showMessageh').style.display='';
>
>  xmlHttp8.open("GET","http://www.xxxxxxxx.com/12313.php",true);
>   xmlHttp8.send(null);
>   document.getElementById('showMessagei').style.display='';
>
>   }
>
> </script>
>
> <SCRIPT src="jquery.tablesorter-2.0.3.js"
> type=text/javascript></SCRIPT>
>
> <SCRIPT src="jquery.tablesorter.filer.js"
> type=text/javascript></SCRIPT>
>
> <SCRIPT src="jquery.tablesorter.pager.js"
> type=text/javascript></SCRIPT>
>
> <SCRIPT type=text/javascript>
>         $(document).ready(function() {
> //              settimeout(ajaxFunction(),5000);
>                 ajaxFunction();
>         $.tablesorter.addParser({
>
>                 id: 'price',
>                 is: function(s) {
>                         // return false so this parser is not auto detected
>                         return false;
>                 },
>                 format: function(s) {
>                 //      alert(s);
>                         return s = s.replace(/[^\d\.]/g,'');
>                 },
>                 // set type, either numeric or text
>                 type: 'currency'
>         });
>
>                 $("#tableOne").tablesorter({ debug: false, sortList: [[0, 0]],
> widgets: ['zebra'],headers: {1: {sorter:'price'}}})
>
>             $("#tableOne").tablesorterPager({ container: $
> ("#pagerOne"), positionFixed: false })
>
>                   });
> </SCRIPT>
>
> <style type="text/css">
> <!--
> .mqstyle {padding-left:30px;background:white url(img/arrow.gif) no-
> repeat scroll top left;}
>
> -->
> </style>
> </head>
> <body>
>
>   <TABLE width="648" class=yui id="tableOne">
>   <THEAD>
>   <TR>
>     <TD class=tableHeader>Click on the headings to sort</TD>
>     <TD class=filter style="BORDER-RIGHT: #7f7f7f 3px solid"
> colSpan=5>&nbsp;</TD>
>   </TR>
>   <TR>
>     <TH><A title="Click Header to Sort"
>       href="">Company</A></TH>
>     <TH><A title="Click Header to Sort"
>       href="">Price</A></TH>
>     <TH><A title="Click Header to Sort"
>       href="">Description</A></TH>
>     <TH>View Details</TH>
>     </TR></THEAD>
>   <TBODY>
>                 <tr>
>                         <td>1</td>
>                         <td><div id="resulta"></div><div id="showMessagea"
> class="mqstyle">Searching</div>
>
> </td>
>                         <td>Company</td>
>                         <td><a href="modet.php?id=1" title="" class="">Click 
> here </a></td>
>
>                 </tr>
>                 <tr>
>                         <td>2</td>
>                         <td><div id="resultb"></div><div id="showMessageb"
> class="mqstyle">Searching</div>
>
> </td>
>
>                         <td>Company 2</td>
>                         <td><a href="modet.php?id=2" title="" class="">Click 
> here </a></td>
>                   </tr>
>                 <tr>
>                   <td>er</td>
>                           <td><div id="resultc"></div><div id="showMessagec"
> class="mqstyle">Searching</div>
>
> </td>
>
>                   <td>Company</td>
>                   <td><a href="modet.php?id=3" title="" class="">Click here 
> </a></
> td>
>                   </tr>
>                 <tr>
>                   <td>dsfvsdfv</td>
>                    <td><div id="resultd"></div><div id="showMessaged"
> class="mqstyle">Searching</div>
>
> </td>
>
>                   <td>Company</td>
>                   <td><a href="modet.php?id=4" title="" class="">Click here 
> </a></
> td>
>                  </tr>
>
>                 <tr>
>                   <td>sdfsdfsdf</td>
>                    <td><div id="resulte"></div><div id="showMessagee"
> class="mqstyle">Searching</div>
>
> </td>
>
>                   <td>Company</td>
>                   <td><a href="modet.php?id=5" title="" class="">Click here 
> </a></
> td>
>                  </tr>
>
>                 <tr>
>                   <td>sdf</td>
>                    <td><div id="resultf"></div><div id="showMessagef"
> class="mqstyle">Searching</div>
>
> </td>
>
>                   <td>fgr</td>
>                   <td><a href="modet.php?id=6" title="" class="">Click here 
> </a></
> td>
>                  </tr>
>
>                 <tr>
>                   <td>sdfsdf</td>
>                    <td><div id="resultg"></div><div id="showMessageg"
> class="mqstyle">Searching</div>
>
> </td>
>
>                   <td>fgfgfg</td>
>                   <td><a href="modet.php?id=7" title="" class="">Click here 
> </a></
> td>
>                  </tr>
>
>         <tr>
>                   <td>sdfsdf</td>
>                    <td><div id="resulth"></div><div id="showMessageh"
> class="mqstyle">Searching</div>
>
> </td>
>
>                   <td>Bfg</td>
>                   <td><a href="modet.php?id=8" title="" class="">Click here 
> </a></
> td>
>                  </tr>
>
>         <tr>
>                   <td>gfg</td>
>                    <td><div id="resulti"></div><div id="showMessagei"
> class="mqstyle">Searching</div>
>
> </td>
>
>                   <td>Bfgfg</td>
>                   <td><a href="modet.php?id=9" title="" class=""">Click here 
> </a></
> td>
>                  </tr>
>
> </TBODY>
>   <TFOOT>
>   <TR id=pagerOne>
>     <TD style="BORDER-RIGHT: #7f7f7f 3px solid" colSpan=4><IMG
> class=first
>       src="sort2_files/first.png"> <IMG class="prev" src="sort2_files/
> prev.png">
>       <INPUT class=pagedisplay>
> ...
>
> read more »

Reply via email to