私はアヤックスを初めて使っています。私はアヤックスの助けを借りてデータを提出し、新しいデータを元のデータと同じdivに置き換えたいと思っています。
スライディングタブ用のjqueryがあります
$(document).ready(function(){
//Vertical Sliding Tabs
$('div#st_vertical').slideTabs({
//Options
contentAnim: 'slideH',
contentAnimTime: 600,
contentEasing: 'easeInOutExpo',
orientation: 'vertical',
tabsAnimTime: 300
});
});
アヤックス
function addhubs()
{
var group =$('#customhubs').val();
var user=$('#loginuser').val();
$.アヤックス({
type:"GET",
url: 'mfrnds.php?val='+group+'&& loguser='+user,
success: function(html){
}
});
}
私はデータを置き換えるdiv
<div id="st_vertical" class="st_vertical">
<div class="st_tabs_container">
<div class="st_slide_container">
<?php $sql=mysql_query("select * from groups");
while($ab=mysql_fetch_array($sql))
{
$gpID[]=$ab['group_id'];
$gp=$ab['group_id'];
$gpName=$ab['group_name'];
?>
- <?php echo $gpName;?>
<?php
}
?>
</div> <!-- /.st_slide_container -->
</div> <!-- /.st_tabs_container -->
and the mfrnds.php of the アヤックス call file contains query to update the new data.
$user=$_GET['loguser'];
$group=$_GET['val'];
$sql=mysql_query("insert into groups (group_name) values ('$group')");
how can i update the div in the above . plz help me .m stuck badly luking for solution from 4 days. thanks