About add content from php file response !
Hi, greetings to all. I'm sorry for my english.
I have a problem I could not solve. The problem is the following: I build dynamic objects from a php page response and I cant capture the event from this dynamic object.
In the index.php page:
<script type="text/javascript">
$(document).ready(function () {
#("#bt").click(function() {
loadTable(1);
});
$("a").click(function() {
alert('yes');
});
function loadTable(_pages)
{
var form_data= {
page_view: _page_view,
page: _pages,
colum: _colum,
direc: _direcc
};
$.ajax
({
type: "POST",
url: "../inc/tables.php",
data: form_data,
success: function(msg)
{
$("#table_block").html(msg);
}
});
}
}
</jscript>
<html>
<input type=button id=bt value=Agregar />
<div id=table_block class=nav></div>
</html>
when shooting an event X (from button click or whatever) funtion loadTable load and div table_block take php responde. The response from table.php some like:
<div id=nav><a href=#>next</a></div>
the problem is tha the event click from <a> is not captured in the index.php. Originaly <div id=nav> is not part of DOM, so, what I can do !?
thanks