I am relatively new to jQuery and I need help getting jQuery to run
with a proxy server, more specifically to get jQuery to "see" the
page being forwarded to the client by my proxy server.
I have the following setup:
1) The proxy program is running on a file called proxy.php located
at the proxy server. This file inserts in the head of the client page
the following:
<script type="text/javascript" src="jquery.js">
</script><script type="text/javascript" src="myprogram.js">
Testing with alert statements, I know that jQuery and myprogram
are properly loaded before the page is displayed.
2) myprogram includes the statements
$(document).ready(function() {
ALL MYPROGRAM CODE IS HERE.
});
3) Problem #1: Testing with alert statements I know that
myprogram begins to be executed at the client after the page is
displayed (I thought that the (document).ready(function() insures that
myprogram should be executed after the data is fully received but
before it is displayed.) But this is the least of the two problems.
Here is the second problem:
4) Problem #2. Firebug informs me that jQuery running out of the
proxy server does not recognize the first DOM expression it encounters
and declare that it "has no properties". The DOM expression looks like
$("#app_content_1234567890>div>table>tbody>tr>td"). The same program
was running fine on my computer in Greasemonkey mode (with the patch
from Joan Piedra at http://joanpiedra.com/jquery/greasemonkey/). I
interpret the statement DOM expression "has no property" as jQuery
does not "see" the page. Why? Am I missing something?
Please let me know if you see a problem with my approach or if you
know of any tutorials or examples on how to run jQuery with a proxy
server.
I would greatly appreciate any help any one of you can give me.
George