I need to access some TD values in a TABLE that is in another HTML file. I am not really sure what way helps me get a working solution for this. Currently I want to access it using jquery. All I imagine for solving this issue is to load the whole external HTML file into a DIV in my main file and seek through the TDs to find my favorite one and print its content to my main TABLE TD. I do not seem to be able to figure it out. please help me with this!
My main PHP file:
<?php
...
...
$loading_transmitter = $_POST['transmitter'];
?>
<script>
$("#result").load('<?php echo $loading_transmitter; ?>',function(){
var main_proc_temp = $(table:nth-child(2).tr:nth-child(1).td:nth-child(3)).text();#table loaded from the external file
alert(main_proc_temp);#it should alert: "OK" but alets: "Undefined"
});
</script>
Is the content of the loaded file available this way? Because after loading it on the page (which goes well), I checked the source code and found out that the result div is yet empty.