jquery - Ajax i want to get this echo Line from php file . keeps getting me error -
how can grab line php file ajax replace current html of div
<div style = "width:260px;height:400px;max-height:400px;overflow:auto;"> <textarea name = "message" onkeydown="send(event, '<?php echo $trow['id'];?>');" id = "text<?php echo $trow['id'];?>" style = "max-height:60px;width:240px;height:20px;overflow:hidden;resize:none;"></textarea> <table class = "table"> <?php while($erow = mysql_fetch_array($erun)){ $fromid = $erow['fromid']; $us = mysql_query("select * user id = $fromid"); $fus = mysql_fetch_array($us); ?> <tr><td> <div id = "change<?php echo $trow['0'];?>"> <a class="pull-left" href="#"> <img src = "profpic/<?php echo $fus['14'];?>" class="media-object" style = "margin-right:5px" height = "40px" width = "40px"> </a> <div class="media-body"> <h6 class="media-heading"><b><?php echo $fus['title']?> <?php echo $fus['fname']?> <?php echo $fus['lname']?></b></h6> <font size = "2"> <?php echo $erow['content']?> </div> </td></tr> <?php } ?> </table> </div> </div>
use jquery's .load() method:
$("#divid").load("/path/to/script.php");
Comments
Post a Comment