Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,028

HOME > PHP > PHP Forum > ช่วยหน่อยค่ะอีกนิดเดียวจะเสร็จแล้ว มันขึ้น error เหมือนในรูปค่ะ



 

ช่วยหน่อยค่ะอีกนิดเดียวจะเสร็จแล้ว มันขึ้น error เหมือนในรูปค่ะ

 



Topic : 074848



โพสกระทู้ ( 169 )
บทความ ( 0 )



สถานะออฟไลน์




เปิด fire fox แล้วใช้ fire fox console ค่ะ มันขึ้นerror ในรูปค่ะ ต้องแกไขยังงัยคะ

1

มันมีปัญหาตรงฟังก์ชันนี้ค่ะ

ไฟล์ order.js
Code (PHP)
function openMycart(){
	var html='';
	$.box({
		ajaxurl: 'mycart.php',
		action	: 'show'
	});
}




Tag : PHP







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2012-03-01 15:18:20 By : teukkead View : 1524 Reply : 7
 

 

No. 1



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook

ตาม error มันบอกว่าไม่ใช่ function ครับ






แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-03-01 17:27:46 By : webmaster
 


 

No. 2



โพสกระทู้ ( 11,835 )
บทความ ( 10 )

สมาชิกที่ใส่เสื้อไทยครีเอท Hall of Fame 2012

สถานะออฟไลน์


โค๊ดอยู่ไหน รู้สึกจะคอยตอบแล้วนะปัญหานี้ ว่ามันไม่มีไฟล์ของ plugin ตัวนี้
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-03-01 17:30:55 By : ikikkok
 

 

No. 3



โพสกระทู้ ( 169 )
บทความ ( 0 )



สถานะออฟไลน์


header.php

Code (PHP)
<?php
session_start();

?>
<!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" />
<!---- <link rel="icon" href="images/favicon.ico" type="image/x-icon" /> --->
<link rel="icon" href="images/fa.ico" type="image/x-icon" />


<link href="style/style.css" rel="stylesheet" type="text/css" />
<!------------- order ----------------->
<script type="text/javascript" src="scripts/order-jquery.js"></script>
<script type="text/javascript" src="scripts/order.js"></script>

<!---- menu --->
<link rel="stylesheet" href="style/style-menu.css" type="text/css" />

<title>waan waan</title>
<style type="text/css">
<!--
.style1 {color: #000000}
.style3 {color: #FFFFFF}
-->
</style>
</head>
<body>

<!------use sytle.css------->
<div class="header">
  <table width="100%" border="0">
    <tr>
      <td width="20%"><a href="index.php"><img src="images/Web_Tag.png" /></a></td>
      <td width="80%"><table width="100%" border="0">
        <tr>
          <td width="8%">&nbsp;</td>
          <td width="2%">&nbsp;</td>
          <td width="11%">&nbsp;</td>
          <td width="54%">&nbsp;</td>
		  <td width="25%">&nbsp;</td>
        </tr>
		<?php
	require_once('class/class.member.php');
	if($sess_user){
	
	$obMember->user_sess = $sess_user;
	$obMember->pass_sess = $sess_pass; 
	$result = $obMember->check_userpass();
	while($R = mysql_fetch_array($result)){
	?>
        <tr>
          <td colspan="5"><div class="name_login">
		    <font color="#FFFFFF">
		      <?= "&nbsp".ยินดีต้อนรับ."&nbsp".คุณ."&nbsp".$R['firstname']."&nbsp;".สถานะ."&nbsp;". $R['MemType']."&nbsp";
		  $idMem = $R['idMember'];
		   }  ?>
	        </font>
			</div>			</td>
          </tr>
        <tr>
		<? }else{?>
          <td colspan="4">
		  <div class="re_gis">
		  <a href="register.php"><font color="#FFFFFF">สมัครสมาชิก</font></a>
		  </div>
		  </td>
          <? //<td><a href="register.php?height=665&width=620&modal=true" class="thickbox"><font color="#FFFFFF">สมัครสมาชิก</font></a></td> ?>
		  <td>
		  <div class="forget">
		  <a href="forget_pass.php"><font color="#FFFFFF">ลืมรหัสผ่าน</font></a>
		  </div>
		  </td>
		  <? }?>
        </tr>
      </table></td>
    </tr>
  </table>
</div>

<!---- use sytle-menu.css ------>
<div id="header">
  <table width="100%" border="0" align="left">
    <tr>
      <td width="11%" align="center" valign="top"><a href="index.php"><img src="images/home.png" name="home" class="herder_on" id="home" onmousemove="home.src='images/home1.png';" onmouseout="home.src='images/home.png';" /> </a></td>
      <td width="11%" align="center" valign="top"><a href="login.php?height=364&amp;width=510&amp;modal=true" class="thickbox" title="Please Sign In"><img src="images/member.png" name="member" 
		class="herder_on" id="member" onmousemove="member.src='images/member1.png';" onmouseout="member.src='images/member.png'" /></a></td>
      <td width="11%" align="center" valign="top"><a href="product.php"><img src="images/product.png" name="product" class="herder_on" id="product" onmousemove="product.src='images/product1.png';" 
		onmouseout="product.src='images/product.png';" /></a></td>
      <td width="11%" align="center" valign="top"><a href="payment.php"><img src="images/payment.png" name="payment" class="herder_on" id="payment" onmousemove="payment.src='images/payment1.png';" 
		onmouseout="payment.src='images/payment.png';" /></a></td>
      <td width="11%" align="center" valign="top"><a href="r_product.php"><img src="images/r_product.png" name="r_product" class="herder_on" id="r_product" onmousemove="r_product.src='images/r_product1.png';" 
		onmouseout="r_product.src='images/r_product.png';" /></a></td>
      <td width="11%" align="center" valign="top"><a href="rules.php?height=550&amp;width=850&amp;modal=true" class="thickbox"><img src="images/board.png" name="board" class="herder_on" id="board" 
		onmousemove="board.src='images/board1.png';" onmouseout="board.src='images/board.png';" /></a></td>
      <td width="11%" align="center" valign="top"><a href="contact.php"><img src="images/contact.png" name="contact" class="herder_on" id="contact" 
	  	onmousemove="contact.src='images/contact1.png';" onmouseout="contact.src='images/contact.png';" /></a></td>
      <td width="11%" align="center" valign="top">
	  <? if(session_is_registered('sessAdminId') || session_is_registered('sessOwner')){ ?>
          <a href="Admin.php"><img src="images/owner.png" name="owner" class="herder_on" id="owner" onmousemove="owner.src='images/owner1.png';" 
		  onmouseout="owner.src='images/owner.png';" /></a>
        <?  }else if(session_is_registered('sessMemId') || session_is_registered('sessUser') || session_is_registered('sessMember')){ ?>
		 <a href="logout.php"><img src="images/logout.png" name="logout" class="herder_on" id="logout" onmousemove="logout.src='images/logout1.png';" 
		 	onmouseout="logout.src='images/logout.png';" /></a>
		 <? } ?>	  </td>
      <td width="11%" align="center" valign="top">
	  <? if(session_is_registered('sessAdminId') || session_is_registered('sessOwner') ){ ?>
          <a href="logout.php"><img src="images/logout.png" name="logout" class="herder_on" id="logout" onmousemove="logout.src='images/logout1.png';" 
		 	onmouseout="logout.src='images/logout.png';" /></a>
        <? } ?>	  </td>
    </tr>
  </table>
</div>






<div class="show_order">
<table width="99%" border="0">
  <tr>
    <td width="58%" align="right">&nbsp;</td>
    <td width="30%" align="left">&nbsp;</td>
    <td width="12%" rowspan="2" align="right" valign="top">
<!----------------------------------- order product ---------------------------------------->
<?php
	if(session_is_registered('sessUser') || session_is_registered('sessMember')){
	?>
	<!----- order product ----->
	<script type="text/javascript" src="scripts/order-jquery.js"></script>
	<script type="text/javascript" src="scripts/order.js"></script>
	<div style="float:center;border:1px dashed #333;padding:10px;position:fixed;background:#FF9;z-index:40;" class="my-cart">
	<img src="images/c_c.png" width="24" height="24" /> <b>สินค้าในตะกร้า</b><br />
	<div style="margin-left:5px;">
            <?php
	if(count($_SESSION["cartNumber"])>0){
		$TotalAmount=0;$TotalPrice=0;
		foreach($_SESSION["cartNumber"] as $RowCount){
			$quantity+=$_SESSION[$RowCount][1];#คำนวณหาจำนวนสินค้าทั้งหมด
		}
			$num=count($_SESSION['cartNumber']);
	}else{
		$num=0;
		$quantity=0;
	}
	?>
	<? //<a href="mycart.php?width=900&modal=true" class="thickbox" onclick="openMycart();return false;"> ?>
	<a href="javascript:void(0);" onclick="openMycart()"> 
	<font color="#000000"><span class="cart_num"><?=$num?></span> รายการ <span class="cart_quantity"><?=$quantity;?> </span> ชิ้น </font>
	</a>
	<? //echo openMycart(); ?>
	 
		</div>
    </div>
	<? } ?>
<!--------------------------------------------------------------------------->
	</td>

  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
</table>
</div>

</body>
</html>



ประวัติการแก้ไข
2012-03-02 11:17:13
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-03-02 11:14:12 By : teukkead
 


 

No. 4



โพสกระทู้ ( 169 )
บทความ ( 0 )



สถานะออฟไลน์


main.php

Code (PHP)
<?php
session_start();
if((!session_is_registered('sessAdminId')) && (!session_is_registered('sessMemId')) && (!session_is_registered('sessUser')) && (!session_is_registered('sessOwner'))&& 
(!session_is_registered('sessMember'))){
echo "<meta http-equiv='refresh' content='0; url=index.php' />"; 
}

 
require_once('header.php'); 
$num_col = 5;
$ColumnStart=1;
?>
<!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" />
<link href="style/style.css" rel="stylesheet" type="text/css" />
<!------ slide image ------>
<link rel="stylesheet" href="themes/default/default.css" type="text/css" media="screen" />
<link rel="stylesheet" href="themes/pascal/pascal.css" type="text/css" media="screen" />
<link rel="stylesheet" href="themes/orman/orman.css" type="text/css" media="screen" />
<link rel="stylesheet" href="style/nivo-slider.css" type="text/css" media="screen" />
<link rel="stylesheet" href="style/style-nivo.css" type="text/css" media="screen" /> 
<!------ view image ------>
<link rel="stylesheet" href="style/ThickBox.css" type="text/css" media="screen" />
<script type="text/javascript" src="scripts/thickbox.js"></script>

<title>waan waan</title>

<style type="text/css">
<!--
.style7 {
	font-size: 16px;
	color: #FF00FF;
}
-->
</style>
</head>
<body bgcolor="#f8b7b8">

<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/th_TH/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>

<div class="bgFull">
<table width="100%" border="0">
  <tr align="center">
    <td width="31%" valign="top"><table width="100%" border="0" align="center">
      <tr>
        <td>
		<div class="promotion"></div>
	<div class="bg_left1">
		<div class="dotted">
		<!--- promotion -->
		<marquee onMouseover="stop()" onmouseout="start()" scrollAmount=2 direction=up width=390 height=100 > 
		<table width="100%" border="0">
		<?php
		require_once('class/class.promotion.php');
			
		$result = $obPromotion->get_promotion();
		while($E = mysql_fetch_array($result)){
		?>
  		<tr>
    		<td>
			<div id="animateList">
			&nbsp;<img src="images/b2_head.gif" />&nbsp;
			<a href="promotion_detail.php?id=<?=$E['id']?>"><?= "&nbsp;".$E['title'];?></a>
			</div>
			</td>
  		</tr>
		<? } ?>
		</table>
		 </marquee> 
		
		</div>
    </div>
	<table width="100%" border="0" align="center">
      <tr>
        <td> <p>&nbsp;</p></td>
      </tr>
    </table>
    <table width="100%" border="0">
      <tr>
        <td align="center">หมวดสินค้า</td>
      </tr>
    </table>
	<div class="dotted">
	<div class="bg_left1">
    <table width="100%" border="0">
	<?php
	require_once('class/class.category.php');
		  $i=0;
		  $result = $obCate->getTyep();
		  while($R = mysql_fetch_array($result)){
		  $id = $R['idCate'];
	?>
	   <tr>
        <td>
		<div id="animateList">
		&nbsp;<img src="images/b2_head.gif" />&nbsp;
			<a href="product.php?id=<?=$id;?>"><?=$R['nameCate']?></a>
		</div>
		</td>
      </tr>
	  <? } ?>
    </table>
	</div>
	</div>
    <table width="100%" border="0">
      <tr>
        <td>&nbsp;</td>
      </tr>
    </table>
    <table width="100%" border="0">
      <tr>
        <td align="center"><a href="look_order.php"><font color="#000000">ข้อมูลการโอนเงิน</font></a></td>
      </tr>
    </table>
    <table width="100%" border="0">
      <tr>
        <td>&nbsp;</td>
      </tr>
    </table>
    <table width="100%" border="0">
      <tr>
        <td><div class="bg_left1">
            <div class="facebook">
              <div class="fb-like" data-send="true" data-width="350" data-show-faces="true"></div>
              <div class="fb-subscribe" data-href="https://www.facebook.com/SweetyLensShop" data-show-faces="true" data-width="350"></div>
              <div class="fb-comments" data-href="https://www.facebook.com/SweetyLensShop" data-num-posts="2" data-width="350"></div>
            </div>
        </div></td>
      </tr>
    </table>
    <table width="100%" border="0">
      <tr>
        <td>&nbsp;</td>
      </tr>
    </table>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <div class="calenda">
      <table width="69%" border="0" align="center">
        <tr>
          <td>
		 <embed src="http://www.123mycodes.com/flash/calendar/hearts/4.swf" quality="high" 
			pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" width="280" height="215"></embed>
			
			<embed src="http://www.respectsoft.com/onlineclock/apple.swf" width="200" height="200" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" wmode="transparent"></embed>
			
			<embed src="http://www.respectsoft.com/onlineclock/digitalclock.swf" width="200" height="100" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" wmode="transparent"></embed>
			
		
		  </td>
        </tr>
      </table>
    </div>
    <table width="100%" border="0">
      <tr>
        <td>&nbsp;</td>
      </tr>
    </table>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
		</td>
      </tr>
    </table>    </td>
    <td width="1%" valign="top">&nbsp;</td>
	
	<div class="right">
	
    <td width="68%" valign="top">
	<table width="100%" border="0">
  <tr>
    <td>
	<div id="wrapper">
      <div class="slider-wrapper theme-default">
        <div id="slider" class="nivoSlider"> 
		<img src="images/slide/slide2.jpg" /> 
		<img src="images/slide/toystory.jpg" /> 
		<img src="images/slide/up.jpg" /> 
		<img src="images/slide/walle.jpg"  data-transition="slideInLeft" /> 
		<img src="images/slide/nemo.jpg" /> </div>
      </div>
	  </div>
        <script type="text/javascript" src="scripts/jquery-1.7.1.min.js"></script>
        <script type="text/javascript" src="scripts/jquery.nivo.slider.pack.js"></script>
        <script type="text/javascript">
			var j = jQuery.noConflict(true);
    		j(window).load(function() {
        		j('#slider').nivoSlider();
    		});
      </script>      </td>
  </tr>
</table>

<table width="100%" border="0">
  <tr>
    <td>
		 <p>&nbsp;</p>
      
      </td>
  </tr>
</table>

     <table width="100%" border="0">
      <tr>
        <td><table width="100%" border="0">
          <tr align="center" valign="top">
            <td><table width="93%" border="0" align="left">
                <tr>
                  <td><a href="track.php"><font color="#000000">แจ้งหมายเลขพัสดุ</font></a></td>
                </tr>
            </table></td>
            <td><table width="100%" border="0">
                <tr>
                  <td><a href="check_sent_order.php"><font color="#000000"> เช็คสถานะออเดอร์ </font></a></td>
                </tr>
            </table></td>
            <td><table width="100%" border="0">
                <tr>
                  <td><a href="f_hot.php"><font color="#000000">กระทู้สุดฮิต</font></a></td>
                </tr>
            </table></td>
          </tr>
          <tr align="left" valign="top">
            <td width="33%"><div class="dotted">
                <div class="bg_left1">
                  <table width="100%" border="0">
                    <?php
					//แจ้งหมายเลขพัสดุ
  				require_once('class/class.track.php');
  				$track = $obTrack->look_Limit_track();
  				while($T = mysql_fetch_array($track)){
				$detail = $T['track']."&nbsp;".$T['name'] ;
				$sub_detail = substr($detail,0,50)."&nbsp;"."..."
				
	  		?>
                    <tr>
                      <td>
					  <div id="animateList"> 
					  &nbsp; <img src="images/b2_head.gif" /> &nbsp; 
					  <a href="trackid.php?id=<?=$T['id']?>">
                        <?php echo $sub_detail;   ?>
                      </a> 
					  </div>
						<div id="hr"></div> 
						  </td>
                    </tr>
                    <? } ?>
                  </table>
                </div>
            </div></td>
            <td width="33%"><div class="dotted">
                <div class="bg_left1">
                  <table width="100%" border="0">
				  <?php
				  //เช็คสถานะออเดอร์
				  require_once('class/class.transfer.php');
				  $check_order = $obTransfer->look_transfer_limit();
				  while($cehek_date_con = mysql_fetch_array($check_order)){
				  if($cehek_date_con['status']==1){
				  	$sented = "(ส่งสินค้าแล้ว)";
				  }else{
					$sented = "(ยังไม่ได้ส่งสินค้า)";
					}
				  
				  //$order_sent = "Lot".$cehek_date_con['id']."&nbsp;".$cehek_date_con['firstname']."&nbsp;".$sented;
				  //$sub_order_sent = substr($order_sent,0,50)."...";
				  
				  ?>
				  
                    <tr>
                      <td>
					  <div id="animateList">
					   &nbsp; <img src="images/b2_head.gif" /> &nbsp; 
					   <a href="check_sent_orderid.php?id=<?=$cehek_date_con['id']?>"><?= "Lot".$cehek_date_con['id']."&nbsp;".$cehek_date_con['firstname']."&nbsp;".$sented;?></a>
					  </div>
                      <div id="hr"></div>
					  </td>
                    </tr>
					<? } ?>
                  </table>
                </div>
            </div></td>
            <td width="31%"><div class="dotted">
                <div class="bg_left1">
                  <table width="100%" border="0">
				  <?php
				  require_once('class/class.forum.php');
				  $hit_forum = $obForum->get_hit_forum();
				  while($hit = mysql_fetch_array($hit_forum)){
				  $image_hit = $hit['view'];
				  //forum hot
				  if($image_hit >= 10){
				  	$f_hot = "<img src=images/hot.gif />";
				  }else if($image_hit>=5 && $image_hit<=9 ){
				  	$f_hot = "<img src=images/cool.gif />";
				  }else{
				  	$f_hot = " ";
				  }
				  ?>
                    <tr>
                      <td>
					   <div id="animateList">
					   &nbsp; <img src="images/b2_head.gif" /> &nbsp; 
					   <a href="forum_detail.php?id=<?=$hit['id_forum']?>"><?=$hit['title']."&nbsp;".$f_hot?></a> 
					  </div>
                      <div id="hr"></div>
					  </td>
                    </tr>
					<? } ?>
                  </table>
                </div>
            </div></td>
          </tr>
        </table>
          <table width="100%" border="0">
      <tr>
        <td align="center"><p>&nbsp;</p>
          <p>สินค้าขายดี</p></td>
      </tr>
    </table>
    <table width="100%" border="0">
      <tr>
        <td align="left" valign="top">
		<table width="221" border="0" align="center">
          <tr>
            <?php
		//iframe
		//<a href="ajax.PHP?keepThis=true&TB_iframe=true&height=250&width=400" title="add a caption to title attribute / or leave blank" class="thickbox">Example 1</a>  
		//php
		//<a href="images/single.jpg" title="add a caption to title attribute / or leave blank" class="thickbox"><img src="images/single_t.jpg" alt="Single Image"/></a>
		
		//<a href="ajax.PHP?height=220&width=400" class="thickbox" title="add a caption to title attribute / or leave blank">No-scroll content</a>
		
		/*
		<a href="pic/<?=$R['pic'];?>" title="<?=$R['description']?>" class="thickbox"> <img border="1" src="pic/<?=$R['pic'];?>"  width="150" height="180" class="productImg" /></a>
		<?php echo '<br />'.$R['namepro']?> <br />
        <?= $R['price']." "."บาท"?><br />
        <a href="#" onclick="add2cart(this,<?=$R['idpro']?>); return false;"> <img src="images/c_c.png" title="หยิบใส่ตะกร้า" width="24" height="24" border="0" /></a>
		*/
				  require('class/class.product.php');
				  $result = $obProduct->get_product_by_rating();
				  while($R = mysql_fetch_array($result)){
				  ?>
        <td width="271" align="center" class="productImg">
		<a href="pic/<?=$R['pic'];?>" title="<?=$R['description'];?>" class="thickbox"> <img border="1" src="pic/<?=$R['pic'];?>"  width="165" height="200" class="productImg" /></a>
		<?php echo '<br />'.$R['namepro']?> <br />
        <?= $R['price']." "."บาท"?><br />
        <a href="#" onclick="add2cart(this,<?=$R['idpro']?>); return false;"> <img src="images/c_c.png" title="หยิบใส่ตะกร้า" width="24" height="24" border="0" /></a>
		</td>
           
		    <?php
			if($ColumnStart==$num_col){//หากคอลัมน์เท่ากับจำนวนคอลัมน์ที่กำหนดไว้
				echo '</tr><tr>';//สร้างแท็ก </tr> ปิด เพื่อจบแถว และสร้าง <tr>เพื่อสร้างแถวใหม่
				$ColumnStart=0;//เซตเป็น 0 เพื่อเริ่มนับคอลัมน์ใหม่
			}
			$ColumnStart++;//เพิ่มคอลัมน์ทีละ1คอลัมน์
			}
			 ?>
          </tr>
        </table>
          </td>
      </tr>
    </table>
	<table width="100%" border="0">
      <tr>
        <td align="center"><img src="images/main_09.jpg" /></td>
      </tr>
    </table>
   <?php
		$result = $obCate->getTyep();
		$i=0;
		while($E = mysql_fetch_array($result)){
		$id = $E['idCate'];
	?>
    <table width="100%" border="0">
      <tr>
        <td>
		<div id="animateList">
		<a href="product.php?id=<?=$id;?>"><?=$E['nameCate']?></a>
		</div>
		</td>
      </tr>
    </table>
<!------------------------------------------------------------------------------------------------------------------------------------------->
	<table width="221" border="0" align="center">
         <tr>
            <?php
				$obProduct->id = $id;
				$result2 = $obProduct->get_ProductBytype();
				
				$num = mysql_num_rows($result2);
					if($num == 0){
						echo "<font color = red>กรุณาเลือกหมวดสินค้า หรือ หมวดสินค้านี้ไม่มีสินค้า</font>";
					}
				while($R = mysql_fetch_array($result2)){
				  ?>
        <td width="271" align="center" class="productImg">
			<a href="pic/<?=$R['pic'];?>" title="<?=$R['description'];?>" class="thickbox"> 
			<img border="1" src="pic/<?=$R['pic'];?>"  width="165" height="200" class="productImg" /></a> 
			<?php echo '<br />'.$R['namepro']?> <br /><?= $R['price']." "."บาท"?><br />
            <a href="#" onclick="add2cart(this,<?=$R['idpro']?>); return false;"> <img src="images/c_c.png" title="หยิบใส่ตะกร้า" width="24" height="24" border="0" /></a>
		</td>
            <?php
				//if($ColumnStart==$num_col){
				//	echo '</tr><tr>';
				//	$ColumnStart=0;
				//}
				//$ColumnStart++;
			}
			 ?>
         </tr>
       </table>
<!------------------------------------------------------------------------------------------------------------------------------------------->
<table width="100%" border="0">
      <tr>
        <td><img src="images/main_09.jpg" /></td>
      </tr>
    </table>
	  <? 
	  $i++;
	  } 
	  ?>
          <p>&nbsp;</p>
          <p>&nbsp;</p>
          <p>&nbsp;</p>
          <p>&nbsp;</p>
          <p>&nbsp;</p>
          <p>&nbsp;</p>
          <p>&nbsp;</p>
          <p>&nbsp;</p>
          <p>&nbsp;</p>
          <p>&nbsp;</p>
          <p>&nbsp;</p>
          <p>&nbsp;</p></td>
      </tr>
    </table>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
	</td>
	</div>

  </tr>
</table>
</div>


<div class="footer">
<table width="100%" border="0">
  <tr>
    <td height="43" align="center">&nbsp;</td>
  </tr>
</table>
</div>
</body>
</html>

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-03-02 11:18:14 By : teukkead
 


 

No. 5



โพสกระทู้ ( 169 )
บทความ ( 0 )



สถานะออฟไลน์


order.js

Code (PHP)
(function($){
	$.box=function(data){
	var config={
		action : '',
		ajaxurl : null,
		addClass	:	'',
		ajaxdata	:	{}
	};
	if(typeof data == 'object'){
		$.extend(config, data);
		$('body').data('box',config);	
	}
	var divbox;
	var divbody;
	if($('#box').length==0){
		divbox = $('<div/>').attr('id','box').hide();
		var html = '';
		html += '<table cellpadding="0" cellspacing="0" align="center" class="cartbox">';
		html += '<tbody>';
		html += '<tr><td></td><td><div class="close">CLOSE</div></td><td></td></tr>';
		html += '<tr><td></td><td id="boxbody"></td><td></td></tr>';
		html += '<tr><td></td><td></td><td></td></tr>';
	html += '</tbody>';
		html += '</table>';
		divbox.html(html);
			divbox.appendTo(document.body);
			divbody = $('#boxbody');
	}else{
			divbox = $('#box');
			divbody = $('#boxbody');
	}
	divbox.addClass('position-absolute');
	if(config.addClass!=''){
			divbox.addClass(config.addClass);
		}
		if(config.ajaxurl!=null){
			divbody.html('');
			$.ajax({
				type: 'POST',
				url: config.ajaxurl,
				cache: false,
				data: config.ajaxdata,
				success: function(data) {
					divbody.html(data);
					$.boxPosition(divbox);
				}
			});
		}else if(config.html!=null){
			divbody.html(config.html);
		}else if(config.selector!=null){
			$(divbody).empty();
			$(config.selector).clone().appendTo(divbody);
		}else if(typeof this == 'object' && $(this).length > 0 ){
			var w = $(this).outerWidth(true);
			divbody.empty();
			divbody.width(w);
			divbody.html($(this).html());
		}
		$.boxPosition(divbox);
		var divback = null;
			if($('#boxback').length==0){
				divback = $('<div/>').attr('id','boxback').hide().insertBefore(divbox);
			}else{
				divback = $('#boxback');
			}
			$(divback).width($(window).width());
			$(window).resize(function(){
				$(divback).width($(window).width());
			});
			if($(document).height()>$(window).height()){
				$(divback).height($(document).height());
			}else{
				$(divback).height($(window).height());
				$(window).resize(function(){
					$(divback).height($(window).height());
				});
			}
			$(divback).css('background-color','#000').css('opacity',0.3).css('filter', 'alpha(opacity='+(0.3*100)+')');
		if(config.action!=''){
			$.boxAction(config.action,divbox,divback,config);
			if(config.callback != null){
				config.callback();
			}
		}
		//Close box
			$('#box, #box .close, #boxback').bind('click.close',function(event){
				if(event.target == this){
					$.boxAction('hide',divbox,divback,config);
					$('#box, #box .close, #boxback').unbind('click.close');
				}
			});
	};
$.boxAction = function(action,divbox,divback,config){
	if(action=='show'){
		$(divbox).fadeIn(300);
		$(divback).fadeIn(300);
		$(document).unbind('keydown.box');
		$(document).bind('keydown.box',function(event){
			if($(divbox).length==0){
				$(document).unbind('keydown.box');
			}else{
				if(event.keyCode == 27){
					$(document).unbind('keydown.box');
					$.boxAction('hide',divbox,divback,config);
				}
			}
		});
	}else if(action=='hide'){
		if(config.action=='showhide'){
			$(divback).add(divbox).remove();
		}else{
			$(divbox).fadeOut(300,function(){
				$(this).remove();
			});

			$(divback).fadeOut(300,function(){
				$(this).remove();
			});
		}
	}else if(action=='showhide'){
		$(document).one('keydown.box',function(event){
			if(event.keyCode == 27){
				$.boxAction('hide',divbox,divback,config);
			}
		});
		divbox.add(divback).fadeIn(500).delay(2000).fadeOut(500,function(){
			$(divbox).remove();
			$(divback).remove();
			$(document).unbind('keydown.box',function(event){
				if(event.keycode == 27){
					$.boxAction('hide',divbox,divback,config);
				}
			});
		});
	}
};
//var jQuery = jQuery.noConflict(true);  ---->add
$.boxPosition = function(divbox){//position of box dialog in center window
	var top;
	top = ($(window).height()-28)/4;
	top_css = parseInt($(document).scrollTop()+top);
	divbox.css('top',top_css+'px');
	divbox.css('left','0px');
}	
});//(jQuery);
function add2cart(ele,pdid){// add to cart ajax
	$.ajax({
  		url:"chkcart.php?cartid="+pdid,
		dataType: 'json',
  		success: function(data) {
		img2cart($(ele).closest('.productItem').find('.productImg'),function(){	
			$('.cart_num').html(data.num);
			$('.cart_quantity').html(data.quantity);
		});
		}
	});	
}
function img2cart(img,success){// animate product image
	if(img==null || $(img).length == 0){
	}else{
		var $imgclone = $(img).clone();
		$imgclone.get(0).className='';
		var _h = $(img).height();
		var _w = $(img).width();
		var __h = $('.my-cart').height();
		var mycart_position=$('.my-cart').position().left;
		var __w = __h*_w/_h;
		$imgclone.css({position:'absolute',top:$(img).position().top,left:$(img).position().left,height: _h,width: _w});
		$imgclone.appendTo('body');
		var prop = {
			top: $(window).scrollTop()+40,
			left:mycart_position,
			opacity: 0.5,
			height: __h,
			width: __w
		};
		$imgclone.animate(prop,1000,function(){
			$imgclone.remove();
			if(typeof success == 'function'){
				success();
			}
		});
	}
}
//jQuery("div p").hide();
//$('someid').hide();


function openMycart(){
	var html='';
	$.box({
		ajaxurl: 'mycart.php',
		action	: 'show'
	})(j);
}


แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-03-02 11:18:47 By : teukkead
 


 

No. 6



โพสกระทู้ ( 169 )
บทความ ( 0 )



สถานะออฟไลน์


มี order-jqury.js อีกตัวค่ะแต่มันยาวไปโพสแล้วเป็นหน้าขาวๆ
ไฟล์ที่เกี่ยวข้องก็มีประมาณนี้ค่ะ

ตอนนี้มันกดตะกร้าสินค้าไม่ขึ้น
แต่ถ้ามันมี jquery ตัวเดียวมันใช้ได้ตามปกติค่ะ
เคยลองเอาฟังก์ชัน

Code (PHP)
<script type="text/javascript">
    		var j = jQuery.noConflict(true);
    		j(window).load(function() {
        		j('#slider').nivoSlider();
    		});
      </script>


ออกแล้วฟังก์ชัน
Code (PHP)
function openMycart(){
	var html='';
	$.box({
		ajaxurl: 'mycart.php',
		action	: 'show'
	})(j);
}


ใช้ได้แต่ ฟังก์ชันนี้ไม่ทำงาน
Code (PHP)
function img2cart(img,success){// animate product image
	if(img==null || $(img).length == 0){
	}else{
		var $imgclone = $(img).clone();
		$imgclone.get(0).className='';
		var _h = $(img).height();
		var _w = $(img).width();
		var __h = $('.my-cart').height();
		var mycart_position=$('.my-cart').position().left;
		var __w = __h*_w/_h;
		$imgclone.css({position:'absolute',top:$(img).position().top,left:$(img).position().left,height: _h,width: _w});
		$imgclone.appendTo('body');
		var prop = {
			top: $(window).scrollTop()+40,
			left:mycart_position,
			opacity: 0.5,
			height: __h,
			width: __w
		};
		$imgclone.animate(prop,1000,function(){
			$imgclone.remove();
			if(typeof success == 'function'){
				success();
			}
		});
	}
}

ไม่รู้ว่ามันเกี่ยวกันรึป่าว


ประวัติการแก้ไข
2012-03-02 11:24:47
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-03-02 11:19:54 By : teukkead
 


 

No. 7



โพสกระทู้ ( 169 )
บทความ ( 0 )



สถานะออฟไลน์


พอดีเขียน javascript ไม่เป็นค่ะ แต่พอจะอ่านเข้าในอยุ่นิดหน่อยค่ะ ติดแค่นี้ ถ้าอันนี้ได้ก็เสร็จแล้วค่ะ ช่วยหน่อยนะคะ ขอบคุณล่วงหน้าคะ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-03-02 11:28:25 By : teukkead
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : ช่วยหน่อยค่ะอีกนิดเดียวจะเสร็จแล้ว มันขึ้น error เหมือนในรูปค่ะ
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 01
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่