ช่วยดูโด้ด วนลูปข้อมูล เพื่อแสดงภาพ ใน tooltip ให้ด้วยครับ
Date :
2011-02-12 14:02:29
By :
neekung
มันแสดงรูปเดียวกันภายในรูปทั้งหมดหรอครับ
Date :
2011-02-12 14:06:30
By :
Dragons_first
มันแสดงเฉพาะรูปแรกรูปเดียวครับ รูปที่ 2 มันไม่แสดงรูปเลย แก้ไขไงดีครับ
Date :
2011-02-12 14:07:44
By :
neekung
โค๊ดเต็มๆละครับ
Date :
2011-02-12 14:17:06
By :
Dragons_first
ประมาณนี้ครับผม
<?php session_start();
?>
<?php include("connect.php");
$RoomSearch=trim($_REQUEST['RoomSearch']);
$RoomStatusSearch=trim($_REQUEST['RoomStatusSearch']);
$pageid=trim($_REQUEST['pageid']);
$numrows=trim($_REQUEST['numrows']) ;
$RoomSearch=htmlspecialchars($RoomSearch);
$RoomStatusSearch=htmlspecialchars($RoomStatusSearch);
$pageid=htmlspecialchars($pageid);
?>
<html><!-- InstanceBegin template="/Templates/index.dwt" codeOutsideHTMLIsLocked="false" --><head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Appointments and Reserving Meeting Rooms</title>
<script type="text/javascript" src="js/jquery-1.2.6.min.js"></script>
<script type="text/javascript">
$ (function(){
$ ("img#RoomPic") .hover (function(event) {
callTooltip ("#RoomId", event);
return true;
}, function(){
$("#RoomId") .hide() ;
}) ;
});
function callTooltip(obj, event) {
var locateX=event.pageX;
var locateY=event.pageY;
locateX+=10;
locateY+=10;
$ (obj) .show() .css({
left:locateX,
top:locateY
});
}
</script>
<!--<script language="javascript" src="js/jquery-1.4.1.min.js"></script>
<script type="text/javascript">
$(function(){
$("img.RoomId").hover(function(event){ // img.userInfo คือ แท็ก img ที่มี class เท่ากับ userInfo
var userID=$(this).attr("title"); // id ของสมาชิกที่ตรงในฐานข้อมูล
var dataUser=$.ajax({
url:"getUserInfo.php",
data:"member_id="+userID,
success:function(dataUser){
callTooltip("#showUserInfo",event,dataUser);
}
}).responseText;
},function(){
$("#showUserInfo").hide();
});
});
function callTooltip(obj,event,strText){ // ฟังก์ชั่นแสดงกล่องข้อความ Tooltip
var locateX=event.pageX;
var locateY=event.pageY;
locateX+=10;
locateY+=10;
$(obj).show().css({
left:locateX,
top:locateY
}).html(strText);
}
</script> -->
<!-- <script type="text/javascript" src="jquery/jquery.js"></script>-->
<!-- <script type="text/javascript" src="jquery/jtip/jtip.js"></script>-->
<!-- <script type="text/javascript" src="jquery-tooltip/js/jquery.js"></script>-->
<!-- <script type="text/javascript" src="jquery-tooltip/js/jtip.js"></script>-->
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<META http-equiv="Page-Enter" content="RevealTrans (Duration=1, Transition=20)">
<META http-equiv="Page-Exit" content="RevealTrans (Duration=1, Transition=20)">
<!-- InstanceBeginEditable name="head" -->
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<script language="JavaScript" type="text/JavaScript">
<!--
function split_page(pageid, RoomSearch, RoomStatusSearch)
{
window.location = "?pageid="+pageid+"&RoomSearch="+RoomSearch+"&RoomStatusSearch="+RoomStatusSearch;
return false;
}
//-->
</script>
<script Language="Javascript">
<!--
function Conf(object){
if(confirm("คุณต้องการลบข้อมูลนี้\nDo you want to delete?")==true){
return true;
}
return false;
}
//-->
</script>
<script language="JavaScript" type="text/JavaScript">
<!--
function change_main1(picture)
{ document.main1.src = picture ;}
//-->
</script>
<style type="text/css">
<!--
a:link {
text-decoration: underline;
color: #000;
}
a:visited {
text-decoration: underline;
color: #000;
}
a:hover {
text-decoration: none;
color: #C06;
font-family: "MS Sans Serif", sans-serif, serif;
font-size: 14px;
font-weight: lighter;
}
a:active {
text-decoration: underline;
color: #000;
}
-->
</style>
<!-- InstanceEndEditable -->
<style type="text/css">
<!--
.Normal {
font-family: "Microsoft Sans Serif", "MS Serif";
font-size: 14px;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
text-decoration: none;
color: #000;
}
.NormalAlert {
font-family: "Microsoft Sans Serif", "MS Serif";
font-size: 14px;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
text-decoration: none;
color: #F00;
}
.Over {
font-family: "Microsoft Sans Serif", "MS Serif";
font-size: 14px;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
text-decoration: none;
background-color: #FF9;
}
.today {
font-family: ms sans serif;
font-size: 18pt;
font-weight: bold;
background-color: #000000;
color: #FFFFFF;
border: 3 double #000000;
}
.sunday {
font-family: "MS Sans Serif", "MS Serif", AngsanaUPC;
font-size: 10pt;
background-color: #F00;
color: #FFFFFF;
}
.norm {
font-family: "MS Sans Serif", "MS Serif", AngsanaUPC;
font-size: 10pt;
background-color: #FFFFFF;
color: #000000;
text-decoration: none;
}
.normcenter {
font-family: "MS Sans Serif", sans-serif, serif;
font-size: 16px;
background-color: #FFFFFF;
color: #000000;
text-decoration: none;
font-weight: normal;
font-style: normal;
line-height: normal;
font-variant: normal;
}
.blockyellow {
border: 1px dashed #FC0;
font-family: "MS Sans Serif", "MS Serif", AngsanaUPC;
font-size: 12px;
font-weight: normal;
color: #000;
text-decoration: none;
padding: 0px;
}
.normPink {
font-family: "MS Sans Serif", "MS Serif", AngsanaUPC;
font-size: 18px;
color: #000;
background-color: #FCF;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
text-decoration: none;
}
.normnew {
font-family: "MS Sans Serif", sans-serif, serif;
font-size: 16px;
background-color: #FFFFFF;
color: #00F;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
text-decoration: none;
text-transform: none;
}
.sundaynew {
font-family: "MS Sans Serif", "MS Serif", AngsanaUPC;
font-size: 12pt;
background-color: #F66;
color: #CF0;
height: 50px;
font-weight: normal;
}
.todaynew {
font-family: "MS Sans Serif", "MS Serif", AngsanaUPC;
font-size: 18pt;
font-weight: normal;
background-color: #FC6;
color: #0FF;
border: 3 double #000000;
}
.headdaySun {
font-family: "MS Sans Serif", "MS Serif", AngsanaUPC;
font-size: 20px;
background-color: #F66;
color: #C00;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
text-decoration: underline;
}
.headdayMon {
font-family: "MS Sans Serif", "MS Serif", AngsanaUPC;
font-size: 20px;
background-color: #FF9;
color: #F90;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
text-decoration: underline;
}
.headdayTue {
font-family: "MS Sans Serif", "MS Serif", AngsanaUPC;
font-size: 20px;
background-color: #F9F;
color: #C0C;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
text-decoration: underline;
}
.headdayWed {
font-family: "MS Sans Serif", "MS Serif", AngsanaUPC;
font-size: 20px;
background-color: #CF9;
color: #090;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
text-decoration: underline;
}
.headdayThu {
font-family: "MS Sans Serif", "MS Serif", AngsanaUPC;
font-size: 20px;
background-color: #FC6;
color: #F60;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
text-decoration: underline;
}
.headdayFri {
font-family: "MS Sans Serif", "MS Serif", AngsanaUPC;
font-size: 20px;
background-color: #9FF;
color: #09F;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
text-decoration: underline;
}
.headdaySat {
font-family: "MS Sans Serif", "MS Serif", AngsanaUPC;
font-size: 20px;
background-color: #99F;
color: #60F;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
text-decoration: underline;
}
.Normal2 {
font-family: "Microsoft Sans Serif", "MS Serif";
font-size: 14px;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
text-decoration: none;
color: #000;
}
.Normal3 {
font-family: "Microsoft Sans Serif", "MS Serif";
font-size: 12px;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
text-decoration: none;
color: #000;
}
.iTooltip{
position:absolute;
border:1px solid #FFCC66;
background-color:#FFFFCC;
color:#000000;
display:none;
padding:5px;
/* width:200px;*/
font-size:12px;
}
-->
</style>
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css">
<link href="SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css">
<link href="Calendar102/style/style.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('Picture/Header_002.jpg')">
<table width="100%" border="0" cellspacing="0" cellpadding="0" background="Button/Background001.jpg">
<tr>
<td width="100%"><table width="1024" height="225" border="1" align="center" cellpadding="0" cellspacing="0" id="Table_">
<tr>
<td height="100"><a href="index.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('หน้าหลัก','','Picture/Header_002.jpg',1)"><img src="Picture/Header_001.gif" alt="หน้าหลัก" name="หน้าหลัก" width="1024" height="100" border="0"></a></td>
</tr>
<tr>
<td height="30"><!-- InstanceBeginEditable name="EditRegion4" --><span class="Normal">ชื่อผู้ใช้งาน: <?php echo $FirstNamess ;?> หน่วยงาน: <?php echo $DepNamess ;?></span><!-- InstanceEndEditable --></td>
</tr>
<tr>
<td height="30"><ul id="MenuBar1" class="MenuBarHorizontal">
<li ><a href="index.php" class="MenuBarHorizontal">:: หน้าแรก</a>
<ul>
<li><a href="#">::: คู่มือการใช้งาน</a></li>
</ul>
</li>
<li><a href="#" class="MenuBarHorizontal">:: ปฏิทินนัดหมาย</a>
<ul>
<li><a href="appcioselect.php">:: นัดหมายระดับผู้บริหาร</a></li>
<li><a href="reportcalendardep.php">:: นัดหมายระดับกอง</a></li>
<li><a href="appperselect.php">:: นัดหมายส่วนตัว</a></li>
</ul>
</li>
<li><a class="MenuBarHorizontal" href="#">:: จองห้องประชุม</a>
<ul>
<li><a href="roomselect.php">:: รายการห้องประชุม (SuperUser)</a></li>
<li><a href="reservselect.php">:: จองห้องประชุม (User)</a></li>
<li><a href="reservselectmanage.php">:: จัดสรรห้องประชุม (SuperUser)</a></li>
</ul>
</li>
<li><a href="#" class="MenuBarItemSubmenu">:: รายงาน</a>
<ul>
<li><a href="reportcalendarcio.php">:: รายงานนัดหมายระดับผู้บริหาร</a></li>
<li><a href="reportcalendardep.php">:: รายงานนัดหมายระดับกอง</a></li>
<li><a href="#">:: รายงานนัดหมายส่วนตัว</a></li>
<li><a href="reportreserving.php">:: รายงานจองห้องประชุม</a></li>
<li><a href="reportlog.php">:: รายงานล็อกผู้ใช้งาน</a></li>
</ul>
</li>
<li><a href="#" class="MenuBarHorizontal">:: การกำหนดค่า</a>
<ul>
<li><a href="depselect.php">:: กำหนดหน่วยงาน (Admin)</a></li>
<li><a href="roleselect.php">:: กำหนดกลุ่มผู้ใช้งาน (Admin)</a></li>
<li><a href="userselect.php">:: กำหนดผู้ใช้งาน (Admin)</a></li>
</ul>
</li>
<li><a href="#" class="MenuBarHorizontal">:: เมนูเข้าสู่ระบบ</a>
<ul>
<li><a href="login.php">:: ล็อกอิน</a></li>
<li><a href="logout.php">:: ล็อกเอาต์</a></li>
<li><a href="loginreset.php">:: เปลี่ยนรหัสผ่าน</a></li>
<li><a href="contactus.php">:: ติดต่อเรา</a></li>
</ul>
</li>
</ul></td>
</tr>
<tr>
<td height="100"><!-- InstanceBeginEditable name="EditRegion3" -->
<form name="roomsearch" method="post" action="roomselect.php" enctype="multipart/form-data">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="Normal">
<tr></tr>
<tr>
<td colspan="6" bgcolor="#FFFFCC">ค้นหา</td>
</tr>
<tr>
<td width="8%" bgcolor="#FFFFCC"> </td>
<td width="9%" align="right" bgcolor="#FFFFCC">ชื่อห้อง : </td>
<td width="28%" bgcolor="#FFFFCC">
<label>
<input type="text" name="RoomSearch" id="RoomSearch" value="<? echo "$RoomSearch" ; ?>">
</label></td>
<td width="5%" align="right" bgcolor="#FFFFCC">สถานะ : </td>
<td width="19%" bgcolor="#FFFFCC">
<label><span>
<select name="RoomStatusSearch" >
<?php
$q_status=mysql_query("Select * From tblstatus Order By Statusid DESC");
while($arr_status=mysql_fetch_array($q_status)){
$RoomStatusId_db=$arr_status[StatusId];
$RoomStatusName_db=$arr_status[StatusName];
?>
<option value="<?php echo $RoomStatusId_db ;?>" <?php if(($RoomStatusId_db==$RoomStatus) or ($RoomStatusId_db==$RoomStatusSearch)){ echo "selected";} ?>> <?php echo "$RoomStatusName_db" ;?></option>
<?php
}
?>
</select>
</span></label></td>
<td width="31%" bgcolor="#FFFFCC"><label>
<input type="submit" name="submit" id="submit" value="ค้นหา">
</label></td>
</tr>
<tr>
<td bgcolor="#FFFFCC"> </td>
<td bgcolor="#FFFFCC"> </td>
<td bgcolor="#FFFFCC"> </td>
<td bgcolor="#FFFFCC"> </td>
<td bgcolor="#FFFFCC"> </td>
<td bgcolor="#FFFFCC"> </td>
</tr>
</table>
</form>
<form name="roomselect" method="post" action="">
<table width="100%" border="0" class="Normal">
<tr>
<td><table width="100%" border="0" class="Normal">
<tr>
<td width="5%" align="center" bgcolor="#99CCFF"><a href="roominput.php" class="Normal"><img src="Button/badd.jpeg" width="40" height="40" alt="เพิ่มรายการใหม่" ></a></td>
<td width="75%" align="center" bgcolor="#99CCFF"><span class="body">
<?php
$page= "Select * From tblroom Where
( (tblroom.RoomName like '%$RoomSearch%') and (tblroom.RoomStatus like '%$RoomStatusSearch%') and (tblroom.DepId = '$DepIdss') )
Order By tblroom.RoomId ASC " ;
$q_page=mysql_query($page)or die("Not Execute Pages Numrows") ;
$numrows_page=mysql_numrows($q_page);
$pagesize=20;
$pageid = $_REQUEST['pageid'];
if(empty($pageid)){$pageid=1;}
$totalpage=ceil($numrows_page/$pagesize);
$pagestart = ($pageid-1)*$pagesize;
$sql= "Select * From tblroom Where
( (tblroom.RoomName like '%$RoomSearch%') and (tblroom.RoomStatus like '%$RoomStatusSearch%') and (tblroom.DepId = '$DepIdss') )
Order By tblroom.RoomId ASC LIMIT $pagestart, $pagesize " ;
$q_sql=mysql_query($sql)or die("Not Execute Pages Limited") ;
?>
มีจำนวน <?php echo $numrows_page ;?> รายการ จำนวน <?php echo $totalpage ;?> หน้า</span></td>
<td width="20%" align="right" bgcolor="#99CCFF"><span class="body">
<input name="RoomSearch" type="hidden" value="<?php echo $RoomSearch ; ?>">
<input name="RoomStatusSearch" type="hidden" value="<?php echo $RoomStatusSearch ; ?>">
<input name="pagestart" type="hidden" value="<?php echo $pagestart ; ?>">
</span>หน้าที่
<select name="pageid" onChange="split_page(roomselect.pageid.value, roomselect.RoomSearch.value, roomselect.RoomStatusSearch.value)">
<?php
For ($i=1; $i<=$totalpage; $i++){
?>
<option value="<?php echo $i ;?>" size= "50" <?php if($i==$pageid){ echo "selected" ;}?>><?php echo "<font size =2>$i </font> ";?></option>
<?php
}
?>
</select>
</td>
</tr>
</table>
<table width="100%" border="1" cellpadding="0" cellspacing="0" class="Normal">
<tr>
<td width="4%" height="22" align="center" bgcolor="#FFCC66">ลำดับ</td>
<td width="9%" align="center" bgcolor="#FFCC66">รูปห้อง</td>
<td width="27%" align="center" bgcolor="#FFCC66">ชื่อห้อง</td>
<td width="8%" align="center" bgcolor="#FFCC66">จำนวนที่</td>
<td width="9%" align="center" bgcolor="#FFCC66">รูปแบบห้อง</td>
<td width="8%" align="center" bgcolor="#FFCC66">เลขที่ตึก</td>
<td width="8%" align="center" bgcolor="#FFCC66">เลขที่ชั้น</td>
<td width="10%" align="center" bgcolor="#FFCC66">หมายเลขห้อง</td>
<td width="6%" align="center" bgcolor="#FFCC66">สถานะ</td>
<td width="6%" align="center" bgcolor="#FFCC66">แก้ไข</td>
<td width="5%" align="center" bgcolor="#FFCC66">ลบ</td>
</tr>
<?php
$color = 0 ;
while($resu=mysql_fetch_array($q_sql)) {
$color ++ ;
$RoomId=$resu[RoomId];
$RoomName=$resu[RoomName];
$SeatCount=$resu[SeatCount];
$RoomForm=$resu[RoomForm];
$RoomDetail=$resu[RoomDetail];
$Build=$resu[Build];
$Floor=$resu[Floor];
$RoomNum=$resu[RoomNum];
$RoomPic=$resu[RoomPic];
$RoomStatus=$resu[RoomStatus];
$UserId=$resu[UserId];
$DepId=$resu[DepId];
$RoomEdit="<a href=\"RoomEdit.php?RoomId=$RoomId&RoomSearch=$RoomSearch&RoomStatusSearch=$RoomStatusSearch&pageid=$pageid\" >"."<img src=\"./Button/b_edit.png\" width=\"22\" height=\"22\" alt=\"แก้ไขข้อมูล\" />"."</A>";
$DepDelete="<a href=\"RoomDelete.php?RoomId=$RoomId&RoomSearch=$RoomSearch&RoomStatusSearch=$RoomStatusSearch&pageid=$pageid\" onClick=\"return Conf(this)\">"."<img src=\"./Button/b_delete.png\" width=\"22\" height=\"22\" alt=\"ลบข้อมูล\" />"."</A>";
if($RoomStatus==1){
$RoomStatus="เปิด" ;
}elseif($RoomStatus==0){
$RoomStatus="ปิด" ;
}else{}
if (($color % 2) ==0){
$bg = "#99CCFF" ;
}else{
$bg = "white" ;
} # end if for color
//echo "<span class='iTooltip' id='infoshow'><img src='FileUpRoom/$RoomPic' width='200' height='200'></span>" ;
//echo "<tr bgcolor=\"$bg\" >";
echo "<tr bgcolor=\"$bg\" onMouseOver=\"className="Over"\" onMouseOut=\"className=""\">";
echo "<td align=center >"." $RoomId"."</td>";
echo "<td align=center >"."<span ><img src='FileUpRoom/$RoomPic' width='200' height='200' class='iTooltip' id='RoomId'><a href ='#' ><img src='FileUpRoom/$RoomPic' id='RoomPic' width='100' height='100' alt='จำนวนที่นั่ง : $SeatCount \nรูปแบบห้องประชุม : $RoomForm \nรายละเอียดเพิ่ม : $RoomDetail \nเลขที่ตึก : $Build \nเลขที่ชั้นของตึก : $Floor \nหมายเลขห้อง : $RoomNum \nสถานะห้อง : $RoomStatus \nรหัสผู้ใช้งาน : $UserId \nรหัสหน่วยงาน : $DepId '></a></span>"."</td>";
//echo "<td align=left >"." $RoomName"."</td>";
//echo "<td align=left >"."<a href=\"#\" ONMOUSEOVER=\"change_main1('<img src='FileUpRoom/$RoomPic' width='100' height='100'>','lightgreen')\"; ONMOUSEOUT=\"change_main1()\"> $RoomName</a>"."</td>";
echo "<td align=left >"." $RoomName"."</td>";
echo "<td align=left >"." $SeatCount"."</td>";
echo "<td align=left >"." $RoomForm"."</td>";
echo "<td align=left >"." $Build"."</td>";
echo "<td align=left >"." $Floor"."</td>";
echo "<td align=left >"." $RoomNum"."</td>";
echo "<td align=left >"." $RoomStatus"."</td>";
echo "<td align=center>"."$RoomEdit"."</td>";
echo "<td align=center>"."$DepDelete"."</td>";
echo "</tr>";
} # end while
echo mysql_error();
mysql_close($conn);
?>
</table>
</td>
</tr>
</table>
</form>
<!-- InstanceEndEditable --></td>
</tr>
<tr>
<td height="30"><img src="images/CalenAndServ_44.gif" width="1024" height="31"></td>
</tr>
<tr> </tr>
</table></td>
</tr>
</table>
<!-- ImageReady Slices (CalenAndServ.psd) -->
<!-- End ImageReady Slices -->
<script type="text/javascript">
<!--
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"../SpryAssets/SpryMenuBarDownHover.gif", imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
//-->
</script>
</body>
<!-- InstanceEnd --></html>
Date :
2011-02-12 14:38:49
By :
neekung
id ไม่ควรซ้ำกันนะครับ จริงๆ แต่ละ id บนเพจ ไม่ควรซ้ำกัน
แนะนำให้ใช้ ตลาสแทนครับ
Date :
2011-02-12 16:21:25
By :
pjgunner.com
แก้ยังไงดีครับ เขียน class ไม่เป็น
Date :
2011-02-12 16:58:01
By :
neekung
id="test" ลบทิ้งเปลี่ยนเป็น
class="test"
.....
$('#test') เปลี่ยนเป็ฯ
$('.test')
เปลี่ยนแบบนี้
Date :
2011-02-12 21:49:57
By :
..
สอบถามท่านผู้รู้อีกนิดครับ ตอนนี้โชว์รูปภาพที่เป็น tooltip ทั้ง ๒ ภาพแล้วครับ
แต่แสดงเป็นรูปเดียวกัน ช่วยปรับโค้ดให้หน่อยครับ
ลองหลายอย่างแล้วไม่รู้จะปรับตรงไหนครับ ช่วยทีครับ
<script type="text/javascript" src="js/jquery-1.2.6.min.js"></script>
<script type="text/javascript">
$(function(){
$('img.ShowPic') .hover (function(event) {
callTooltip ('#RoomPic', event);
}, function(){
$('#RoomPic') .hide() ;
}) ;
});
function callTooltip(obj, event) {
var locateX=event.pageX;
var locateY=event.pageY;
locateX+=10;
locateY+=10;
$ (obj) .show() .css({
left:locateX,
top:locateY
});
}
</script>
---------------------------------------------------------------------------------------------------------
echo "<td align=center >"."<span ><img src='FileUpRoom/$RoomPic' width='200' height='200' class='iTooltip' id='RoomPic'><a href ='#' ><img src='FileUpRoom/$RoomPic' class='ShowPic' width='100' height='100' </a></span>"."</td>";
Date :
2011-02-12 22:59:38
By :
neekung
มีใครช่วยแก้ไขโค้ดได้ไหมครับ
Date :
2011-02-15 14:20:16
By :
neekung
Load balance : Server 03