ช่วยดู pop - up ให้หน่อยครับ

ถาม-ตอบ แนะนำไอเดียว โค้ดตัวอย่าง แนวทาง วิธีแก้ปัญหา ช่วยดู pop - up ให้หน่อยครับ

ช่วยดู pop - up ให้หน่อยครับ
ทำปฏิทินจองห้องประชุมอ่ะคับ มีปัญหาตรงที่คลิกที่กิจกรรมแล้วจะให้มันขึ้น pop-up ขึ้นมาอ่ะคับ ทำไม่ได้ ต้องทำไงครับ ช่วยแนะนำเป็นแนวทางด้วยนะครับ

อันนี้หน้า index ครับ
<?php
session_start();
	include ('Connection.php');
	$strSQL_admin_index = "SELECT * FROM user";
	$objQuery_admin_index = mysql_query($strSQL_admin_index);
	$objResult_admin_index = mysql_fetch_array($objQuery_admin_index);
	
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
 <meta charset='utf-8'/>
        <title>Example : a popup contact form using jQuery and ColorBox plugin </title>

        <link rel="stylesheet" href="http://www.formmail-maker.com/var/demo/jquery-popup-form/colorbox.css" />
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
        <script src="http://www.formmail-maker.com/var/demo/jquery-popup-form/jquery.colorbox-min.js"></script>

        <script>
            $(document).ready(function(){
                $(".iframe").colorbox({iframe:true, fastIframe:false, width:"450px", height:"480px", transition:"fade", scrolling   : false});
            });
        </script>
        
        
        <style>
            #cboxOverlay{ background:#666666; }
        </style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Meeting Room</title>
<meta name="keywords" content="Business Website, free templates, website templates, 3-column layout, CSS, XHTML" />
<meta name="description" content="Business Website, 3-column layout, free CSS template from templatemo.com" />
<link href="templatemo_style.css" rel="stylesheet" type="text/css" />

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>prac full calendar</title>
<link rel='stylesheet' type='text/css' href='fullcalendar/redmond/theme.css' />
<link rel='stylesheet' type='text/css' href='fullcalendar/fullcalendar.css' />
<script type='text/javascript' src='fullcalendar/jquery/jquery.js'></script>
<script type='text/javascript' src='fullcalendar/jquery/jquery-ui-custom.js'></script>
<script type="text/javascript" src="fullcalendar/fullcalendar.min.js"></script>
<script type="text/javascript">
$(function(){
    $('#calendar').fullCalendar({
		header: {
				left: 'month,agendaWeek,agendaDay',
				center: 'title',
				right: 'prev,next today'
		},
		editable: true,
		theme:true,
		events: "getCalendar.php?gData=1",
		loading: function(bool) {
				if (bool) $('#loading').show();
				else $('#loading').hide();
		}
        // put your options and callbacks here
    });
	
});
</script>

<style type="text/css">
body{
	padding:0px;
	margin:0px;
	font-size:12px;
	font-family:Tahoma, Geneva, sans-serif;
	background-color: #FFFFFF;
}
#calendar{
	width:80%;
	margin:auto;
	color: #FFFFFF;
}
h2 {
	color: #000000;
}
</style>


</head>

<body>
   
    <div id="templatemo_header">
    	<div id="logosection"></div>
        <div id="header">
        	<div class="title">ระบบจองห้องประชุม</div>

        </div>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p><br />
        </p>
</div>

  <!-- start of content -->
    
  <div id="templatemo_content"> 
    
    	<!-- start of left column -->
    <div id="templatemo_left_column">
    	  <div id="leftcolumn_box01">
    	    <div class="leftcolumn_box01_top">
    	      <h22><img src="Picture/Login.png" alt="" width="24" height="22" /> Login</h22> 
    	    </div>
    	    <div class="leftcolumn_box01_bottom">
    	      <?php 
					
					if($_SESSION["username"] == ""){
				?>
    	      <form method="post" action="check_login.php">
    	        <div align="right">
    	          <div class="form_row"><font color="#FFFFFF" size="-1">ชื่อผู้ใช้งาน</font>
    	            <input class="inputfield" name="txtUsername" type="text" id="txtUsername"/>
  	            </div>
  	          </div>
    	        <div class="form_row">
    	          <div align="right"><font color="#FFFFFF" size="-1">รหัสผ่าน </font>
    	            <input class="inputfield" name="txtPassword" type="password" id="txtPassword"/>
  	            </div>
  	          </div>
    	        <div align="right">
    	          <input class="button" type="submit" name="Submit" value="Login" />
  	          </div>
  	        </form>
    	      <?php }else{
					$strSTT = "SELECT * FROM user WHERE username = '".$_SESSION["username"]."'";
					$objQuerySTT = mysql_query($strSTT);
					$objResultSTT = mysql_fetch_array($objQuerySTT);
	 			?>
    	      <form method="post" action="Logout.php">
    	        <div align="left">
    	          <div class="form_row"><font color="#FFFFFF" size="-1">ชื่อผู้ใช้งาน :
    	            <?php 
						$strSTT = "SELECT * FROM user WHERE username = '".$_SESSION["username"]."'";
						$objQuerySTT = mysql_query($strSTT);
						$objResultSTT = mysql_fetch_array($objQuerySTT);
						echo $objResultSTT["username"];
					?>
  	            </font></div>
  	          </div>
    	        <div class="form_row">
    	          <div align="left"> <font color="#FFFFFF" size="-1">สถานะ : </font><font color="#FFFFFF" size="-1"><?php echo $objResultSTT["status"];?></font></div>
  	          </div>
    	        <div align="right">
    	          <input class="button" type="submit" name="Submit" value="Logout" />
  	          </div>
  	        </form>
    	      <?php } ?>
  	      </div>
  	    </div>
    	  <div id="leftcolumn_box02">
    	    <ul>
    	      <li><a href="index.php">หน้าแรก</a></li>
              <li><a href="book_room.php">จองห้องประชุม</a></li>
              <li><a href="bookreport.php">ตารางการใช้ห้องประชุม</a></li>
              <li><a href="search.php" target="_parent">ค้นหาการจองห้องประชุม</a></li>
              <li><a href="check_empty.php" target="_parent">ตรวจสอบห้องว่าง</a></li>
              <li><a href="addshow_room.php" target="_parent">รายละเอียดห้องประชุม</a></li>
              <br />
              <?php 
		if($_SESSION["username"] != ""){
			$strSttMnba = "SELECT * FROM user WHERE username = '".$_SESSION["username"]."'";
			$objQuerySttMnba = mysql_query($strSttMnba);
			$objResultSttMnba = mysql_fetch_array($objQuerySttMnba);
			if($objResultSttMnba["status"]=="USER"){?>
     <ul class="menu">
        <li><a href="index.php" class="parent"><span>หน้าแรก</span></a>
        	<div><ul>
                <li><a href="user_page.php"><span>หน้านักเรียน</span></a>
            </ul></div>
        </ul>
	<?php }else if($objResultSttMnba["status"]=="ADMIN"){?>	
    <ul class="menu">
         <li><a href="index.php" class="parent"><span>หน้าแรก</span></a>
        	<div><ul>
        	  <li><a href="admin_Contact.php"><span>ติดต่อ</span></a></li>
                <li><a href="admin_Pass.php"><span>เปลี่ยนรหัสผ่าน</span></a></li>
            </ul></div>		
        </li>
    </ul>
	<?php } }?>
    
  	        </ul>
  	    </div>
    	  <div id="imagebutton">
    	    <!-- end of left column -->
    	    <!-- start of middle column -->
    	    <!-- end of middle column -->
  	   </div>
    </div>
    <p>&nbsp;</p>
    <table width="700" height="177">
      <tr>
        <th scope="col"><div id='calendar'> 
  
    <p></p>
    <p></p>
    <p> </p>
    <!-- end of left column --></p> 
</div></th>
      </tr>
    </table> 
    
    
    <!-- end of content -->
        
        
	<div id="templatemo_footer">
    Copyright &copy; 2013 <a href="#">ERP Team @ Deestone Co., Ltd.</a></div>
    <div id="templatemo_footer_bottom"></div>

</div>
</body>
</html>

อันนี้หน้า getCalender

<?php
header("Content-type:text/json; charset=UTF-8");              
header("Cache-Control: no-store, no-cache, must-revalidate");             
header("Cache-Control: post-check=0, pre-check=0", false);   
$con_db=mysql_connect("localhost","root","1992") or die("Cannot connect db server");
$select_db=mysql_select_db("meeting");
if($_GET['gData']){
	$event_array=array();
	$i_event=0;
	mysql_query("SET NAMES UTF8"); 
	$q="SELECT * FROM book WHERE date(fromdate)>='".date("Y-m-d",$_GET['start'])."'  ";
	$q.=" AND date(todate)<='".date("Y-m-d",$_GET['end'])."' ORDER by book_id";
	$qr=mysql_query($q);
	while($rs=mysql_fetch_array($qr)){
		$event_array[$i_event]['id']=$rs['book_id'];
		$event_array[$i_event]['title']=$rs['title'];
		$event_array[$i_event]['start']=$rs['fromdate'];
		$event_array[$i_event]['end']=$rs['todate'];
		$event_array[$i_event]['url']='show_book1.php?book_id='.$rs['book_id'];
		$i_event++;
		
	}
	echo json_encode($event_array);
	exit;	
}
?>




Bank 101.108.183.xxx 23-04-2014 16:04:12

คำแนะนำ และการใช้งาน

สมาชิก กรุณา ล็อกอินเข้าระบบ เพื่อตั้งคำถามใหม่ หรือ ตอบคำถาม สมาชิกใหม่ สมัครสมาชิกได้ที่ สมัครสมาชิก


  • ถาม-ตอบ กรุณา ล็อกอินเข้าระบบ
  • เปลี่ยน


    ( หรือ เข้าใช้งานผ่าน Social Login )

 ความคิดเห็นที่ 1
แสดง popup window ตรงกลาง 


ninenik 124.120.233.xxx 24-04-2014
 ความคิดเห็นที่ 2
ขอบคุณครับ smiley
แต่ผมติดปัญหาตรงที่ไม่รู้จะเอาโค้ด pop-up ตามลิงค์ที่พี่ให้ไปแทรกตรงไหน  เพราะในไฟล์ getCalendar  ตรง url มันให้ใส่ชื่องานที่เราจะลิ้งไปอ่ะคับ ซึ่งมันไม่เป็น pop-up  ช่วยบอกผมทีคับผมไปไม่ถูกแล้ว TT

<?php

header("Content-type:text/json; charset=UTF-8");              
header("Cache-Control: no-store, no-cache, must-revalidate");             
header("Cache-Control: post-check=0, pre-check=0", false);   
$con_db=mysql_connect("localhost","root","1992") or die("Cannot connect db server");
$select_db=mysql_select_db("meeting");
if($_GET['gData']){
	$event_array=array();
	$i_event=0;
	mysql_query("SET NAMES UTF8"); 
	$q="SELECT * FROM book WHERE date(fromdate)>='".date("Y-m-d",$_GET['start'])."'  ";
	$q.=" AND date(todate)<='".date("Y-m-d",$_GET['end'])."' ORDER by book_id";
	$qr=mysql_query($q);
	while($rs=mysql_fetch_array($qr)){
		$event_array[$i_event]['id']=$rs['book_id'];
		$event_array[$i_event]['title']=$rs['title'];
		$event_array[$i_event]['start']=$rs['fromdate'];
		$event_array[$i_event]['end']=$rs['todate'];
		$event_array[$i_event]['url']='show_book.php?book_id='.$rs['book_id']; //ติดปัญหาตรงนี้เลยอ่ะคับไม่รู้จะเอาโค้ดของพี่มาใส่ยังไง
		$i_event++;
		
	}
	echo json_encode($event_array);
	exit;	
}
?>


bank 101.108.173.xxx 24-04-2014 11:19
 ความคิดเห็นที่ 3
<script type="text/javascript">  
function popup(url,name,windowWidth,windowHeight){      
    myleft=(screen.width)?(screen.width-windowWidth)/2:100;   
    mytop=(screen.height)?(screen.height-windowHeight)/2:100;     
    properties = "width="+windowWidth+",height="+windowHeight;  
    properties +=",scrollbars=yes, top="+mytop+",left="+myleft;     
    window.open(url,name,properties);  
}  
</script>  
<script type="text/javascript">
$(function(){
	$("a.fc-event").click(function(event){
		var urlA=$(this).attr("href");
		popup(urlA,'',400,400);
		event.preventDefault();
	});
});
</script>


ninenik 124.120.233.xxx 24-04-2014
 ความคิดเห็นที่ 4
ต้องเอาไปไว้ในหน้าไหนอ่ะคับ ใช่ getCalendar ป่าวคับ


bank 101.108.173.xxx 24-04-2014 11:53
 ความคิดเห็นที่ 5
หน้าปฏิทิน


ninenik 124.120.65.xxx 24-04-2014
 ความคิดเห็นที่ 6
ลองแล้วไม่ได้อ่ะคับ  ตรง   $event_array[$i_event]['url']='show_book1.php?book_id='.$rs['book_id']; นี้ต้องเอาออกป่าวคับ หน้าปฏิทินมันยังลิงค์มาหน้า show_book1.php อยู่เลยอ่ะคับ ไม่เป็น pop-up


bank 101.108.173.xxx 24-04-2014 12:06
 ความคิดเห็นที่ 7
อันนี้ต้องไล่เพิ่มเองหละ เพราะไม่รู้ว่าหน้าตาเป็นไง

ออนไลน์ดูได้ไหม เพื่อแนะนำได้


ninenik 124.120.65.xxx 24-04-2014
 ความคิดเห็นที่ 8
http://www.thaicreate.com/php/forum/103098.html   ปัญหาผมเป็นตามเว็บนี้เลยคับ เค้าก็ยังทำไม่ได้


bank 101.108.173.xxx 24-04-2014 13:37
 ความคิดเห็นที่ 9
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>prac full calendar</title>
<link rel='stylesheet' type='text/css' href='fullcalendar/redmond/theme.css' />
<link rel='stylesheet' type='text/css' href='fullcalendar/fullcalendar.css' />
<script type='text/javascript' src='fullcalendar/jquery/jquery.js'></script>
<script type='text/javascript' src='fullcalendar/jquery/jquery-ui-custom.js'></script>
<script type="text/javascript" src="fullcalendar/fullcalendar.min.js"></script>
<script type="text/javascript">    
function popup(url,name,windowWidth,windowHeight){        
    myleft=(screen.width)?(screen.width-windowWidth)/2:100;     
    mytop=(screen.height)?(screen.height-windowHeight)/2:100;       
    properties = "width="+windowWidth+",height="+windowHeight;    
    properties +=",scrollbars=yes, top="+mytop+",left="+myleft;       
    window.open(url,name,properties);    
}    
</script>    
<script type="text/javascript">
$(function(){
    $('#calendar').fullCalendar({
		header: {
				left: 'month,agendaWeek,agendaDay',
				center: 'title',
				right: 'prev,next today'
		},
		editable: true,
		theme:true,
		events: "getCalendar.php?gData=1",
		loading: function(bool) {
				if (bool) $('#loading').show();
				else $('#loading').hide();
		}
        // put your options and callbacks here
    });

    $(".fc-event").find("a").live("click",function(){
		 event.preventDefault();  
        var urlA=$(this).attr("href");  
        popup(urlA,'',400,400);         
    });  
	
});
</script>

<style type="text/css">
body{
	padding:0px;
	margin:0px;
 	font-size:12px;
	font-family:Tahoma, Geneva, sans-serif;	
}
#calendar{
	width:750px;	
	margin:auto;
}
</style>
</head>

<body>
<br />
<br />

<div id='calendar'></div>


</body>
</html>


ninenik 124.120.65.xxx 24-04-2014
 ความคิดเห็นที่ 10
-น่าจะใช้ live แทน เพราะเป็น ข้อมูลที่ถูกสร้างจาก ajax
    $(".fc-event").find("a").live("click",function(){
		 event.preventDefault();  
        var urlA=$(this).attr("href");  
        popup(urlA,'',400,400);         
    });  


ninenik 124.120.65.xxx 24-04-2014
1 2 Next






เว็บไซต์ของเราให้บริการเนื้อหาบทความสำหรับนักพัฒนา โดยพึ่งพารายได้เล็กน้อยจากการแสดงโฆษณา โปรดสนับสนุนเว็บไซต์ของเราด้วยการปิดการใช้งานตัวปิดกั้นโฆษณา (Disable Ads Blocker) ขอบคุณครับ