0
이 플러그인을 프로젝트 http://www.tablefixedheader.com/에 사용하고 있지만 테이블을 만드는 동안 일부 동적 데이터를 넣어야합니다. 테이블을 구축"fixeheadertable"플러그인에서 AJAX 데이터를 사용할 수 있습니까?
JS 코드는 다음과 같습니다 나는 몇 가지 매개 변수를 포함 할 필요가
<script type="text/javascript">
$.ajax({
url: 'dialogs/WMS/mytable.php',
success: function(data) {
$('.maintab<?php echo $varc ?>
').html(data).fixheadertable({
colratio : [45, 24, 24, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150 ],
zebra : true,
sortable : true,
sortedColId : 3,
resizeCol : true,
height : 150,
pager : true,
sortType : ['integer', 'string', 'string', 'string', 'string', 'date']
});
}
});
</script>
. 나는 시도하는 것 :
예 1 (아무 성공)
<script type="text/javascript">
$.ajax({
url:'dialogs/mytable.php?columns='<?php echo $column ?>,
type: 'post',
success: function(data) {
$('.maintab<?php echo $varc ?>
').html(data).fixheadertable({
colratio : [45, 24, 24, 180, 180, 180, 180, 180,180, 180, 180, 180, 180, 180]
zebra : true,
sortable : true,
sortedColId : 3,
resizeCol : true,
height : 150,
pager : true,
sortType : ['integer', 'string', 'string', 'string', 'string', 'date']
});
}
});
</script>
예 2 (아무 성공)
<script type="text/javascript">
$.ajax({
url:'dialogs//mytable.php?columns='<?php $column ?>,
type: 'post',
success: function(data) {
$('.maintab<?php echo $varc ?>
').html(data).fixheadertable({
colratio : [45, 24, 24, 180, 180, 180, 180, 180,180, 180, 180, 180, 180, 180],
zebra : true,
sortable : true,
sortedColId : 3,
resizeCol : true,
height : 150,
pager : true,
sortType : ['integer', 'string', 'string', 'string', 'string', 'date']
});
}
});
</script>
예 3 (아무 성공)
<script type="text/javascript">
$.ajax({
url:'dialogs/mytable.php',
data: {
columns: <?php echo $column ?>,
}
type: 'post',
success: function(data) {
$('.maintab<?php echo $varc ?>
').html(data).fixheadertable({
colratio : [45, 24, 24, 180, 180, 180, 180, 180,180, 180, 180, 180, 180, 180],
zebra : true,
sortable : true,
sortedColId : 3,
resizeCol : true,
height : 150,
pager : true,
sortType : ['integer', 'string', 'string', 'string', 'string', 'date']
});
}
});
</script>
예 4 (성공 없음)
<script type="text/javascript">
$.ajax({
url:'dialogs/mytable.php',
data: {
columns: <?php $column ?>,
}
type: 'post',
success: function(data) {
$('.maintab<?php echo $varc ?>
').html(data).fixheadertable({
colratio : [45, 24, 24, 180, 180, 180, 180, 180,180, 180, 180, 180, 180, 180],
zebra : true,
sortable : true,
sortedColId : 3,
resizeCol : true,
height : 150,
pager : true,
sortType : ['integer', 'string', 'string', 'string', 'string', 'date']
});
}
});
</script>
개발자의 답변이 없으므로 포럼에서 비슷한 답변을 찾을 수 없습니다. 누구든지 진행 방법을 알고 있습니까?
는해야하지 'url :'dialogs/mytable.php? columns = php echo $ column?> ','??? 또는'url : 'dialogs/mytable.php? columns ='+ php echo $ column?>;'열이 숫자 인 경우도 –
답장을 보내 주셔서 감사합니다. –