The browser, its JavaScript interpreter, and jQuery have no idea whether
your page is a static page or was generated dynamically. It's all the same
by the time it gets to the browser.
 
If one works and the other doesn't, there must be *some* difference in the
HTML code delivered to the browser, or perhaps a difference in the headers.
 
If you do a View Source on both the working static page and the broken
dynamic page, and compare the two source files with a diff program such as
Araxis Merge or WinDiff, it should show you what is different between the
two. If the source appears identical, then check the headers. Somewhere in
there must be the difference.
 
If nothing turns up, post links to both versions of your page and somebody
may be able to spot the problem.
 
-Mike



  _____  

From: David Blomstrom

With the help of this group, I got my first JQuery function to work - a
combination sortable table columns/alternate row colors script. The only
problem is that it works on my static page but not on a dynamic page in my
content management system (PHP).

The weird thing is that I copied the source code from a dynamic page into my
static page, and it does work - but only on the static page.

On my dynamic page, the sortable column function doesn't work at all. The
zebra stripes function works only to the extent that any row I mouseover
acquires a colored background.

Does anyone have a hunch what's going on?

Thanks.

* * * * *

<script src="/1A/js/jquery-1.2.6.min.js" type="text/javascript"></script>


<script src="/1A/js/tablesorter/jquery.tablesorter.js"
type="text/javascript"></script>
<script language="JavaScript" type="text/JavaScript">
 $(document).ready(function() 
  { 
  $("#myTable").tablesorter({ widgets: ['zebra']} ); 
  }
 );
</script>




Reply via email to