i have a file that gets its content from another file, i use JS to call a php file that gets information from a database and display it.
This works fine, but i want to be able to get hold of the information that has been displayed from the other file, i thought i could use $('.className').val(); but this always seens to return 'undefined'.
this is the JS code so far: index.php
$(document).ready(function()
{
$(".trade_window").load('signals.php?action=init');
console.log($('.market_name_1').val());
});
As i said the output of the init is just fine but getting hold of the value is the problem, this is the HTML that it generated by the php file :
<div class="market">
<h3 class="market_name_1">GBPUSD</h3>
<img src="images/buy.png">
<p class="market_data">
</p><p>BUY</p>
<p class="market_data">1.55605</p>
<p class="market_data">18:21:02</p>
</div>
I am currently learning the wonders of JS and JQuery so looking to learn from my mistakes. Any ideas on this one? I really think i'm just missing something silly but i can't but my finger on it.