|
|
|
ช่วยดู Code ให้หน่อยได้ไหมค่ะพอดีทำแถบเมนูแล้วมันไม่หุบกลับค่ะยังไงรบกวนช่วยหน่อยนะค่ะแนะนำหน่อยค่ะ |
|
|
|
|
|
|
|
Code (PHP)
<? ob_start();
@session_start();
include ("../connet.php");
?>
<!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"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="../Scripts/swfobject_modified.js" type="text/javascript"></script>
<head>
<!-- TemplateBeginEditable name="doctitle" -->
<title>::ร้านแม่ฟ้าหลวงคอมพิวเตอร์::</title>
<!-- TemplateEndEditable -->
<script type='text/javascript' src='../jquery-1.8.2.js'></script>
<style type='text/css'>
.listmenu {
width: 175px;
font-family: Tahoma;
font-size: 13px;
text-align : left;
}
.headmenu {
padding: 5px 10px;
cursor: pointer;
position: relative;
margin:1px;
font-weight:bold;
background: #eef4d3 url("http://png-3.findicons.com/files/icons/2222/gloss_basic/16/arrow_left.png") center right no-repeat;
background-color: #CCCCCC;
}
.bodymenu {
display:none;
}
.bodymenu a {
display:block;
color:#006699;
background-color:#EFEFEF;
padding-left:10px;
font-weight:bold;
text-decoration:none;
}
.bodymenu a:hover {
color: #000000;
text-decoration:underline;
}
</style>
<script type='text/javascript'>//<![CDATA[
$(window).load(function(){
$(document).ready(function(){
$("#mymenu p.headmenu").mouseover(function(){
$(this).css({backgroundImage:"url(http://png-2.findicons.com/files/icons/2222/gloss_basic/16/arrow_down.png)"}).next("div.bodymenu").slideDown(500).siblings("div.bodymenu").slideUp("slow");
$(this).siblings().css({backgroundImage:"url(http://png-3.findicons.com/files/icons/2222/gloss_basic/16/arrow_left.png)"});
});
});
});//]]>
</script><style type="text/css"> body { background-color: #FFF; background-image: url(../images/Background.png); margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } #apDiv1 { position:absolute; left:324px; top:157px; width:574px; height:451px; z-index:1; } </style>
<style type="text/css">
body,td,th {
color: #000;
font-family: Arial, Helvetica, sans-serif;
} #apDiv2 { position:absolute; left:243px; top:548px; width:318px; height:110px; z-index:1; }
</style><style type="text/css">
a:link {
color: #000;
text-decoration: none;
} a:visited {
text-decoration: none;
color: #000;
} a:hover {
text-decoration: none;
color: #000;
} a:active {
text-decoration: none;
color: #000;
} #apDiv3 { position:absolute; left:245px; top:893px; width:532px; height:211px; z-index:1; }
.wrapper{
width:924px;
margin:0 auto;
background:#fff;
}
#container{
padding-top:10px;
}
.cleft{
float:left;
width:183px;
padding:0 2px 0 3px ;
}
.ccenter{
float:left;
width:550px;
}
.cright{
width:186px;
float:right;
}
.divlogin{
padding-top:35px;
padding-left:16px;
height:106px;
width:170px;
background:#fff url("images/Member.png") no-repeat left top;
}
.divcart{
margin-top:15px;
padding-top:40px;
padding-left:16px;
height:101px;
width:170px;
background:#fff url("images/SpCart.png") no-repeat left top;
}
.clear{
font-size:1px;
clear:both;
}
.divsearch{
margin-top:15px;
padding-top:40px;
padding-left:16px;
height:150px;
width:170px;
background:#fff url("images/Search.png") no-repeat left top;
}
#mymenu{
padding-top:32px;
width:183px;
background:#fff url("images/Categories.png") no-repeat left top;
}
</style>
<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->
</head>
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
<script type='text/javascript' src='jquery-1.2.6.min.js'></script>
<script type='text/javascript' src='kwicks.js'></script>
<script type='text/javascript' src='custom.js'></script>
<body>
<div class='wrapper'>
<div class='header'>
<object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="920" height="158">
<param name="movie" value="../images/HeadFlash.swf" />
<param name="quality" value="high" />
<param name="wmode" value="opaque" />
<param name="swfversion" value="6.0.65.0" />
<!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
<param name="expressinstall" value="../Scripts/expressInstall.swf" />
<!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="../images/HeadFlash.swf" width="924" height="158">
<!--<![endif]-->
<param name="quality" value="high" />
<param name="wmode" value="opaque" />
<param name="swfversion" value="6.0.65.0" />
<param name="expressinstall" value="../Scripts/expressInstall.swf" />
<!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
<div>
<h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
<div><!-- header-->
<div class='topmenu'>
<ul class="kwicks">
<li id="kwick1"><a href="../showproduct2.php">Home</a></li>
<li id="kwick2"><a href="shownews.php">Contact</a></li>
<li id="kwick3"><a href="AboutUs.php">Downloads</a></li>
<li id="kwick4"><a href="Buying_Guide.php">Search</a></li>
<li id="kwick5"><a href="../webboard.php">Product</a></li>
<li id="kwick6"><a href="ContactUs.php">Search</a></li>
<li id="kwick7"><a href="../sitemap.php">Search</a></li>
</ul>
</div><!-- topmenu-->
<div id='container'>
<div class='cleft'>
<div id="mymenu" class="listmenu">
<? $sql="select * from product_type";
$result=mysql_query($sql);
while ($rs=mysql_fetch_array($result)){?>
<p class="headmenu" onmouseover="document.getElementById('submenu_<?=$rs[typepro_id];?>').style.display='block' " ><a href="../index.php?tid=<?=$rs[typepro_id];?>" ><font color="#000000" size="-1"><?=$rs[type_name];?></a></p>
<? $sqlp="select distinct brand_name from product where type_name='$rs[typepro_id]' order by brand_name asc";
$resultp=mysql_query($sqlp);
$nump = mysql_num_rows($resultp);
if($nump!="0"){?>
<div class="bodymenu" id='submenu_<?=$rs[typepro_id];?>' >
<? while($rsp=mysql_fetch_array($resultp)){
$sqlb="select * from brand where brand_id='$rsp[brand_name]'";
$resultb=mysql_query($sqlb);
$rsb=mysql_fetch_array($resultb);?>
<a href="../index.php?tid=<?=$rs[typepro_id];?>&brand_id=<?=$rsb[brand_id];?>"><font color="#000000" size="-1"><?=$rsb[brand_name];?></a>
<? }?></div>
<? }?>
<? }?>
</div><!-- mymenu -->
<div style='padding:10px 0;text-align:center;'>
<a href="http://track.thailandpost.co.th/trackinternet/Default.aspx" target="_new"><img src="../images/post.jpg" width="150" height="150" /></a>
</div>
</div><!-- cleft-->
<div class='ccenter'>
<!-- TemplateBeginEditable name="main" -->
<!-- TemplateEndEditable -->
</div><!-- ccenter-->
<div class='cright'>
<div class='divlogin'>
<? if($_SESSION["login_true"]==""){?>
<form id="login" name="login" method="post" action="../chklogin.php">
<table width="178" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<label for="textfield"></label><input type="text" name="username" id="username" />
</td>
</tr>
<tr>
<td><label for="textfield2"></label><input type="password" name="password" id="password" />
</td>
</tr>
<tr>
<td><font color="#000000" font size="-1"><a href="../customer.php">สมัครสมาชิก</a> | <a href="../ForgotPassword.php">ลืมรหัสผ่าน</a></font></td>
</tr>
<tr>
<td>
<div style='text-align:right;padding-right:20px'><input type="image" name="submit" src="../images/Login.png" OnClick="javascript:document.login.submit()"></div>
</td>
</tr>
</table>
</form>
<? }else{?>
<table width="178" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<font color="#000000"><font size="-1">สวัสดีคุณ <?=$_SESSION["login_name"];?>
</td>
</tr>
<tr>
<td>
<a href="../memorder.php"><font color="#000000"><font size="-1">ข้อมูลการสั่งซื้อ</a>
<BR><a href="../memedit.php"><font color="#000000"><font size="-1">แก้ไขข้อมูลส่วนตัว</a>
<BR><a href="../memeditpass.php"><font color="#000000"><font size="-1">เปลี่ยนรหัสผ่าน</a>
<BR><a href="../logout.php"><font color="#000000"><font size="-1">ออกจากระบบ</a>
</td>
</tr>
</table>
<? }?>
</div><!-- divlogin -->
<div class='divcart'>
<?if($_SESSION['pro_OrderNum']>=1){?>
<font color="#000000" size="-1">จำนวนสินค้า
<?=$_SESSION['pro_amountall'];?></font>
<BR>
<font color="#000000" size="-1">ยอดเงิน
<?=number_format($_SESSION['pro_PriceAll'],2);?></font>
<HR width="150">
<a href="../shopping_add.php"><font color="#000000" size="-1">›› ดูรายการสินค้า</font> </a>
<BR>
<? }?>
<? if($_SESSION["login_true"]!=""){?>
<a href="../mylist.php"><font color="#000000"size="- 1">›› Mylist </font></a>
<? }?>
</div><!-- divcart -->
<div class='divsearch'>
<form method='get' action='index.php'>
<table width="177" border="0" cellspacing="2" cellpadding="0">
<tr>
<td>
<label for="select"></label>
<select name="tid">
<?
include "connet.php";
$sql="select * from product_type";
$result = $result=mysql_query($sql);
while ($rs=mysql_fetch_array($result)){
$rs[typepro_id]=$rs [typepro_id];
$type_name=$rs[type_name];
echo "<option value='$rs[typepro_id]'>$type_name</option>";
}
?>
</select>
</td>
</tr>
<tr>
<td>
<select name='range'>
<option value='1-3000'>1-3000</option>
<option value='3001-6000'>3001-6000</option>
<option value='6001-9000'>6001-9000</option>
<option value='9001-12000'>9001-12000</option>
<option value='12001-15000'>12001-15000</option>
<option value='15001-18000'>15001-18000</option>
<option value='18001-21000'>18001-21000</option>
<option value='21001-24000'>21001-24000</option>
<option value='24001-30000'>24001-30000</option>
<option value='30000-9999999'>มากกว่า 30000</option>
<select>
</td>
</tr>
<tr>
<TD>
<input type="image" src="../images/Search1.png" /><img src="../images/Cancel.png" alt="" width="63" height="18" />
</td>
</tr>
</table>
</form>
</div><!-- divsearch -->
</div><!-- cright-->
<div class='clear'></div>
</div>
<div class='footer' ><img src="../images/Footer.png" / width="924"></div>
</div>
<script type="text/javascript">
var MenuBar2 = new Spry.Widget.MenuBar("MenuBar2", {imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
swfobject.registerObject("FlashID");
</script>
</body>
</html>
<script>
function check_search(){
var Myform=document.search;
var txt="";
if (Myform.sprice.value==""){ txt=txt+"- ราคาเริ่มต้น\n";}
if (Myform.fprice.value==""){ txt=txt+"- ราคาสิ้นสุด\n";}
if(txt!=""){alert('กรุณากรอกข้อมูลเหล่านี้\n'+txt);return false;}
document.search.submit();}
function check_number() {
e_k=event.keyCode
if (e_k != 13 && (e_k < 46) || (e_k > 57)) {
event.returnValue = false;
alert("ต้องเป็นตัวเลข (0-9) เท่านั้น กรุณาตรวจสอบข้อมูลของท่านอีกครั้ง...");
}
}
</script>
Tag : PHP, MySQL, HTML/CSS, JavaScript, jQuery, CakePHP
|
|
|
|
|
|
Date :
2013-03-04 22:48:22 |
By :
ความรู้ยังน้อย |
View :
4986 |
Reply :
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 กระทู้แล้วนะฮะคุณเมจิก - -
ที่ไม่มีใครตอบเพราะคงไม่มีใครเคยไปยุ่งกับ Spry ในแบบ manual มั้งครับ (ผมเองยิ่งไม่เคยใช้เลย เพราะผมไม่ได้ใช้ dw)
แต่ผมลองหาข้อมูลดู น่าจะผิดตรงนี้ครับ
บรรทัดที่ 375
var MenuBar2 = new Spry.Widget.MenuBar("MenuBar2", {imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
ซึ่งตรง MenuBar2 มันควรจะเป็น id ของ <ul> หรือ <ol>
และผมก็ได้ลองหา element ที่มี id="MenuBar2" ก็ไม่เจอครับ
อ้างอิง
Working with the Spry Menu Bar widget - http://helpx.adobe.com/dreamweaver/using/spry-menu-bar-widget.html
|
|
|
|
|
Date :
2013-03-05 05:09:15 |
By :
cookiephp |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 05
|