jquery ui php,php – 打开带有动态内容的jQuery UI对话框
我有一個(gè)關(guān)于jQuery UI對話框的問題,并顯示數(shù)據(jù)庫中的動(dòng)態(tài)內(nèi)容.
所以我得到了一個(gè)web應(yīng)用程序,我還需要?jiǎng)?chuàng)建一個(gè)管理模塊來管理所有用戶和其他信息.我創(chuàng)建了一個(gè)頁面,顯示列表中的所有用戶,在每一行中我也創(chuàng)建了一個(gè)編輯按鈕.我想這樣做,當(dāng)你按下用戶的編輯按鈕時(shí),會(huì)打開一個(gè)對話框,在對話框中顯示所有用戶信息和內(nèi)容.
所以我的問題是,最好的方法是什么?我正在考慮制作一個(gè)PHP頁面,我執(zhí)行MySQL查詢并在對話框中顯示,但我相信有更好的方法..
編輯:這是現(xiàn)在頁面的代碼.我添加了一個(gè)用于測試目的的小占位符對話框.
script type="text/javascript">
jQuery(document).ready( function(){
jQuery(".edit-button").click( showDialog );
//variable to reference window
$myWindow = jQuery('#myDiv');
//instantiate the dialog
$myWindow.dialog({ height: 600,
width: 800,
modal: true,
position: 'center',
autoOpen:false,
title:'Bewerk therapeut',
overlay: { opacity: 0.5, background: 'black'}
});
}
);
//function to show dialog
var showDialog = function() {
$myWindow.show();
//open the dialog
$myWindow.dialog("open");
}
var closeDialog = function() {
$myWindow.dialog("close");
}
PHP:
//LEFT OUTER JOIN Vragen ON Vragen.bsn_nummer = Gebruikers.bsn_nummer
include_once 'classes/class.mysql.php';
$db = new Mysql();
$dbUsers = new Mysql();
$db->Query("SELECT * FROM USERS_users ORDER BY username ASC");
$db->MoveFirst();
echo "
echo "
BSN NummerGebruikersnaam VoornaamAchternaam";while(! $db->EndOfSeek()) {
$row = $db->Row();
$dbUsers->Query("SELECT * FROM Gebruikers WHERE user_idnr = '{$row->user_idnr}'");
$rowUser = $dbUsers->Row();
echo "
".@$rowUser->bsn_nummer."".@$row->username."".@$rowUser->voornaam."".@$rowUser->achternaam."";}
echo "
";?>
Gebruiker bewerken
創(chuàng)作挑戰(zhàn)賽新人創(chuàng)作獎(jiǎng)勵(lì)來咯,堅(jiān)持創(chuàng)作打卡瓜分現(xiàn)金大獎(jiǎng)總結(jié)
以上是生活随笔為你收集整理的jquery ui php,php – 打开带有动态内容的jQuery UI对话框的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: delphi 算术溢出解决方法_性能优化
- 下一篇: iis php网站500错误原因_因为曾