|
|
|
ถามเกี่ยวกับ การใช้ Ajax แล้ว javascript ไม่ทำงาน คือผมใช้ innerHTML แล้ว javascript ไม่ทำงาน |
|
|
|
|
|
|
|
ขอดูโค้ดทั้งหมดครับ
|
|
|
|
|
Date :
2009-11-27 16:11:13 |
By :
xbeginner01 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>:: <?=$objResult["title"];?> ::</title>
<link href="../css/main.css" rel="stylesheet" type="text/css" />
<link href="../css/font.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="../images/Computer.ico" />
<script language=JavaScript src="../js/bbcode.js" type=text/javascript></script>
<link type="text/css" rel="stylesheet" href="../editor/syntaxhighlighter/styles/shCore.css" />
<link type="text/css" rel="stylesheet" href="../editor/syntaxhighlighter/styles/shThemeDefault.css" />
<script type="text/javascript" src="../editor/syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="../editor/syntaxhighlighter/scripts/shBrushPhp.js"></script>
<script type="text/javascript">
SyntaxHighlighter.all();
</script>
<? if($_SESSION["roleid"]==1){ ?>
<script type="text/javascript" language="javascript">
function Delete(id){
// alert(memberid);
if (confirm("คุณต้องการลบคอมเม้นนี้")){
document.location = '../manageform.php?page=deletecomment&id='+id+'&forumid='+<?=$value[0];?>;
}
}
</script>
<? } ?>
<script>
function changeEmo(value){
if(value == 1){
var emo1 = "<a onclick='replaceText(':r2:', document.forms.frmMain.detail); return false;' href='javascript:void(0);'><img src='../images/bbcode/r2.gif' alt=':r2:' border='0' title=':r2:' /></a>";
document.getElementById('emotion').innerHTML = emo1;
}
if(value == 2){
document.getElementById('emotion').innerHTML = '';
}
}
</script>
</head>
<body>
<!-- header start -->
<div id="header"></div>
<!-- header end -->
<!-- body start -->
<div id="body">
<div id="comment">
<div class="title"><a href="../index.html">HOME</a> > <a href="../forum.html">Forum</a> > <?=$objResult["title"];?></div>
<div class="subject">» <?=$objResult["title"];?></div>
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" style="height:5px; background-color:#DCDCDC"></td>
</tr>
<tr>
<td width="25%" style="vertical-align:top">
<table width="100%" cellpadding="2" cellspacing="2">
<tr>
<td colspan="3" style="height:5px;"></td>
</tr>
<tr>
<td align="center" colspan="3" class="font5"><?=$objResult["username"];?></td>
</tr>
<tr>
<td colspan="3" style="height:5px;"></td>
</tr>
<tr>
<td align="center" colspan="3" class="font3"><img src="../images.php?id=<?=$objResult["roleid"];?>"/></td>
</tr>
<tr>
<td align="center" colspan="3" class="font3"><?=$objResult["rolename"];?></td>
</tr>
<tr>
<td align="center" colspan="3" ><img src="../upload/<?=$objResult["picture"];?>" style="width:80px; height:80px;" /></td>
</tr>
<? if($objResult["sexid"] == 1){?>
<tr>
<td width="30%"></td>
<td colspan="2" class="font3">เพศ : <img src="../images/Male.gif" title="ชาย" /></td>
</tr>
<? }else {?>
<tr>
<td width="30%"></td>
<td colspan="2" class="font3">เพศ : <img src="../images/Female.gif" title="หญิง" /></td>
</tr>
<? } ?>
<tr width="30%">
<td></td>
<td colspan="2" class="font3"><img src="../images/numpost.png" title="Post" style="margin-right:10px;"/> <?=number_format($objResult["numpost"]);?> </td>
</tr>
<tr>
<td></td>
<td colspan="2" class="font3"><img src="../images/coin.png" title="Coin" style="margin-right:10px;"/> <?=number_format($objResult["coin"]);?> </td>
</tr>
<tr>
<td></td>
<td colspan="2" class="font3"><img src="../images/ruby.png" title="Ruby" style="margin-right:10px;"/> <?=number_format($objResult["ruby"]);?> </td>
</tr>
<tr>
<td colspan="3" class="font3"> </td>
</tr>
</table>
</td>
<td style="vertical-align:top">
<div class="detail">
<table width="100%" cellpadding="2" cellspacing="2">
<? if($_SESSION["roleid"]==1){ ?>
<tr>
<td width="10%" class="font2" align="center">#<span class="red">post</span> </td>
<td class="font2">« เมื่อ: <?=$objResult["date"];?> »</td>
<td width="25%"><a href="../edittopic_admin.php?id=<?=$value[0]?>"><img border="0" src="../images/edit.png"/></a> </td>
</tr>
<? }else { ?>
<? if($objResult["username"]== $_SESSION["username"]){ ?>
<tr>
<td width="10%" class="font2" align="center">#<span class="red">post</span> </td>
<td class="font2">« เมื่อ: <?=$objResult["date"];?> »</td>
<td width="25%"><a href="../edittopic.php?id=<?=$value[0]?>"><img border="0" src="../images/edit.png"/></a> </td>
</tr>
<? } else { ?>
<tr>
<td width="10%" class="font2" align="center">#<span class="red">post</span> </td>
<td class="font2">« เมื่อ: <?=$objResult["date"];?> »</td>
<td width="25%"> </td>
</tr>
<? } } ?>
<tr>
<td colspan="3"><span class="dottd"></span></td>
</tr>
<tr>
<td colspan="3" class="font_comment"><?=$objResult["detail"];?>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td colspan="2" style="height:5px; background-color:#DCDCDC"></td>
</tr>
</table>
<?
while($objComment = mysql_fetch_assoc($resultComment)){
$i++;
?>
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" style="height:5px;"></td>
</tr>
<tr>
<td width="25%" style="vertical-align:top">
<table width="100%" cellpadding="2" cellspacing="2">
<tr>
<td colspan="3" style="height:5px;"></td>
</tr>
<tr>
<td align="center" colspan="3" class="font5"><?=$objComment["username"];?></td>
</tr>
<tr>
<td colspan="3" style="height:5px;"></td>
</tr>
<tr>
<td align="center" colspan="3"><img src="../images.php?id=<?=$objComment["roleid"];?>"/></td>
</tr>
<tr>
<td align="center" colspan="3" class="font3"><?=$objComment["rolename"];?></td>
</tr>
<tr>
<td align="center" colspan="3" ><img src="../upload/<?=$objComment["picture"];?>" style="width:80px; height:80px;" /></td>
</tr>
<? if($objComment["sexid"] == 1){?>
<tr>
<td width="30%"></td>
<td colspan="2" class="font3">เพศ : <img src="../images/Male.gif" title="ชาย" /></td>
</tr>
<? }else {?>
<tr>
<td width="30%"></td>
<td colspan="2" class="font3">เพศ : <img src="../images/Female.gif" title="หญิง" /></td>
</tr>
<? } ?>
<tr>
<td width="30%"></td>
<td colspan="2" class="font3"><img src="../images/numpost.png" title="Post" style="margin-right:10px;"/> <?=number_format($objComment["numpost"]);?> </td>
</tr>
<tr>
<td></td>
<td colspan="2" class="font3"><img src="../images/coin.png" title="Coin" style="margin-right:10px;"/> <?=number_format($objComment["coin"]);?> </td>
</tr>
<tr>
<td></td>
<td colspan="2" class="font3"><img src="../images/ruby.png" title="Ruby" style="margin-right:10px;"/> <?=number_format($objComment["ruby"]);?> </td>
</tr>
<tr>
<td colspan="3" class="font3"> </td>
</tr>
</table>
</td>
<td style="vertical-align:top">
<div class="detail">
<table width="100%" cellpadding="2" cellspacing="2">
<? if($_SESSION["roleid"]==1){ ?>
<tr>
<td width="10%" class="font2" align="center">#<span class="red"><?=$i ;?></span> </td>
<td class="font2">« เมื่อ: <?=$objComment["date"];?> »</td>
<td width="25%"><a href="../editcomment_admin.php?id=<?=$objComment["commentid"]?>"><img border="0" src="../images/edit.png"/></a> <a href="javascript:Delete('<?=$objComment["commentid"]?>')"><img border="0" src="../images/delete.png"/></a></td>
</tr>
<? }else { ?>
<? if($objComment["username"]== $_SESSION["username"]){ ?>
<tr>
<td width="10%" class="font2" align="center">#<span class="red"><?=$i ;?></span> </td>
<td class="font2">« เมื่อ: <?=$objComment["date"];?> »</td>
<td width="25%"><a href="../editcomment.php?id=<?=$objComment["commentid"]?>"><img border="0" src="../images/edit.png"/></a> </td>
</tr>
<? }else { ?>
<tr>
<td width="10%" class="font2" align="center">#<span class="red"><?=$i ;?></span> </td>
<td class="font2">« เมื่อ: <?=$objComment["date"];?> »</td>
<td width="25%"> </td>
</tr>
<? } } ?>
<tr>
<td colspan="3"><span class="dottd"></span></td>
</tr>
<tr>
<td colspan="3" class="font_comment"><?=$objComment["detail"];?>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td colspan="2" style="height:5px; background-color:#DCDCDC"></td>
</tr>
</table>
<? } ?>
</div>
<? if (empty($_SESSION["id"])){ ?>
<table width="100%" cellpadding="2" cellspacing="2">
<tr>
<td class="font2"><img src="../images/post.png" /> เพิ่มความคิดเห็น</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td colspan="3" style="height:5px; background-color:#FCD06F"></td>
</tr>
<tr>
<td colspan="3" style="height:15px;"></td>
</tr>
<tr>
<td colspan="3" class="font2">กรุณา <a href="../index.html">Login</a> ก่อน ถึงจะสามารถตอบได้ </td>
</tr>
</table>
<? }else {
$number = rand(1000,9999);
$_SESSION["captcha"] = $number;
?>
<form action="../manageform.php?page=post&id=<?=$value[0];?>" name="frmMain" method="post">
<table width="100%" cellpadding="2" cellspacing="2">
<tr>
<td width="51%" class="font2"><img src="../images/post.png" /> เพิ่มความคิดเห็น</td>
<td width="26%"> </td>
<td width="23%"> </td>
</tr>
<tr>
<td colspan="3" style="height:5px; background-color:#FCD06F"></td>
</tr>
<tr>
<td colspan="3" style="height:15px;"></td>
</tr>
<tr>
<td colspan="3" class="font2">Name : </td>
</tr>
<tr>
<td colspan="3" ><input type="text" name="username" value="<?=$_SESSION["username"];?>" class="textbox1" size="35" maxlength="20" readonly="readonly" /></td>
</tr>
<script language=JavaScript type=text/javascript>
function showimage()
{
document.images.icons.src = icon_urls[document.frmMain.detail.icon.options[document.frmMain.detail.icon.selectedIndex].value];
}
function bbc_highlight(something, mode)
{
something.style.backgroundImage = "url("+(mode ? "../images/bbcode/bbc_hoverbg.gif)" : "../images/bbcode/bbc_bg.gif)");
}
</script>
<tr>
<td colspan="3">
<a onclick="surroundText('', '', document.forms.frmMain.detail); return false;" href="javascript:void(0);"><IMG onmouseover="bbc_highlight(this, true);" title="ตัวหนา" style="BACKGROUND-IMAGE: url(../images/bbcode/bbc_bg.gif); MARGIN: 1px 2px 1px 1px" onmouseout="if (window.bbc_highlight) bbc_highlight(this, false);" height="22" alt="ตัวหนา" src="../images/bbcode/bold.gif" width="23" align="bottom" border="0"></a>
<a onclick="surroundText('', '', document.forms.frmMain.detail); return false;" href="javascript:void(0);"><img Onmouseover="bbc_highlight(this, true);" title="ตัวเอียง" style="BACKGROUND-IMAGE: url(../images/bbcode/bbc_bg.gif); MARGIN: 1px 2px 1px 1px" onmouseout="if (window.bbc_highlight) bbc_highlight(this, false);" height="22" alt="ตัวเอียง" src="../images/bbcode/italicize.gif" width="23" align="bottom" border="0"></a>
<a onclick="surroundText('', '', document.forms.frmMain.detail); return false;" href="javascript:void(0);"><img Onmouseover="bbc_highlight(this, true);" title="ตัวขีดเส้นใต้" style="BACKGROUND-IMAGE: url(../images/bbcode/bbc_bg.gif); MARGIN: 1px 2px 1px 1px" onmouseout="if (window.bbc_highlight) bbc_highlight(this, false);" height="22" alt="ตัวขีดเส้นใต้" src="../images/bbcode/underline.gif" width="23" align="bottom" border="0"></a>
<a onclick="surroundText('', '', document.forms.frmMain.detail); return false;" href="javascript:void(0);"><img Onmouseover="bbc_highlight(this, true);" title="ตัวมีขีดกลาง" style="BACKGROUND-IMAGE: url(../images/bbcode/bbc_bg.gif); MARGIN: 1px 2px 1px 1px" onmouseout="if (window.bbc_highlight) bbc_highlight(this, false);" height="22" alt="ตัวมีขีดกลาง" src="../images/bbcode/strike.gif" width="23" align="bottom" border="0"></a>
<IMG style="MARGIN: 0px 3px" alt="|" src="../images/bbcode/divider.gif">
<a onclick="surroundText('', ' ', document.forms.frmMain.detail); return false;" href="javascript:void(0);"><img Onmouseover="bbc_highlight(this, true);" title="จัดย่อหน้าชิดซ้าย" style="BACKGROUND-IMAGE: url(../images/bbcode/bbc_bg.gif); MARGIN: 1px 2px 1px 1px" onmouseout="if (window.bbc_highlight) bbc_highlight(this, false);" height="22" alt="จัดย่อหน้าชิดซ้าย" src="../images/bbcode/left.gif" width="23" align="bottom" border="0"></a>
<a onclick="surroundText('', ' ', document.forms.frmMain.detail); return false;" href="javascript:void(0);"><img Onmouseover="bbc_highlight(this, true);" title="จัดย่อหน้ากึ่งกลาง" style="BACKGROUND-IMAGE: url(../images/bbcode/bbc_bg.gif); MARGIN: 1px 2px 1px 1px" onmouseout="if (window.bbc_highlight) bbc_highlight(this, false);" height="22" alt="จัดย่อหน้ากึ่งกลาง" src="../images/bbcode/center.gif" width="23" align="bottom" border="0"></a>
<a onclick="surroundText('', ' ', document.forms.frmMain.detail); return false;" href="javascript:void(0);"><img Onmouseover="bbc_highlight(this, true);" title="จัดย่อหน้าชิดขวา" style="BACKGROUND-IMAGE: url(../images/bbcode/bbc_bg.gif); MARGIN: 1px 2px 1px 1px" onmouseout="if (window.bbc_highlight) bbc_highlight(this, false);" height="22" alt="จัดย่อหน้าชิดขวา" src="../images/bbcode/right.gif" width="23" align="bottom" border="0"></a>
<IMG style="MARGIN: 0px 3px" alt="|" src="../images/bbcode/divider.gif">
<a onclick="surroundText('', document.forms.frmMain.detail); return false;" href="javascript:void(0);"><img Onmouseover="bbc_highlight(this, true);" title="ใส่รูป" style="BACKGROUND-IMAGE: url(../images/bbcode/bbc_bg.gif); MARGIN: 1px 2px 1px 1px" onmouseout="if (window.bbc_highlight) bbc_highlight(this, false);" height="22" alt=ใส่รูป src="../images/bbcode/img.gif" width="23" align="bottom" border="0"></a>
<a onclick="surroundText('http://', '', document.forms.frmMain.detail); return false;" href="javascript:void(0);"><img Onmouseover="bbc_highlight(this, true);" title="ใส่ไฮเปอร์ลิ้งค์" style="BACKGROUND-IMAGE: url(../images/bbcode/bbc_bg.gif); MARGIN: 1px 2px 1px 1px" onmouseout="if (window.bbc_highlight) bbc_highlight(this, false);" height="22" alt=ใส่ไฮเปอร์ลิ้งค์ src="../images/bbcode/url.gif" width="23" align="bottom" border="0"></a>
<a onclick="surroundText('', '', document.forms.frmMain.detail); return false;" href="javascript:void(0);"><img Onmouseover="bbc_highlight(this, true);" title="ใส่อีเมล์" style="BACKGROUND-IMAGE: url(../images/bbcode/bbc_bg.gif); MARGIN: 1px 2px 1px 1px" onmouseout="if (window.bbc_highlight) bbc_highlight(this, false);" height="22" alt=ใส่อีเมล์ src="../images/bbcode/email.gif" width="23" align="bottom" border="0"></a>
<IMG style="MARGIN: 0px 3px" alt="|"src="../images/bbcode/divider.gif" >
<a onclick="surroundText('', '', document.forms.frmMain.detail); return false;" href="javascript:void(0);"><img Onmouseover="bbc_highlight(this, true);" title="ตัวยก" style="BACKGROUND-IMAGE: url(../images/bbcode/bbc_bg.gif); MARGIN: 1px 2px 1px 1px" onmouseout="if (window.bbc_highlight) bbc_highlight(this, false);" height="22" alt="ตัวยก" src="../images/bbcode/sup.gif" width="23" align="bottom" border="0"></a>
<a onclick="surroundText('', '', document.forms.frmMain.detail); return false;" href="javascript:void(0);"><img Onmouseover="bbc_highlight(this, true);" title="ตัวห้อย" style="BACKGROUND-IMAGE: url(../images/bbcode/bbc_bg.gif); MARGIN: 1px 2px 1px 1px" onmouseout="if (window.bbc_highlight) bbc_highlight(this, false);" height="22" alt="ตัวห้อย" src="../images/bbcode/sub.gif" width="23" align="bottom" border="0"></a>
<a onclick="surroundText('[quote=Quote]', '[/quote]', document.forms.frmMain.detail); return false;" href="javascript:void(0);"><img Onmouseover="bbc_highlight(this, true);" title="ใส่การอ้างถึงคำพูด "style="BACKGROUND-IMAGE: url(../images/bbcode/bbc_bg.gif); MARGIN: 1px 2px 1px 1px" onmouseout="if (window.bbc_highlight) bbc_highlight(this, false);" height="22" alt="ใส่การอ้างถึงคำพูด" src="../images/bbcode/quote.gif" width="23" align="bottom" border="0"></a>
<a onclick="surroundText(' ', document.forms.frmMain.detail); return false;" href="javascript:void(0);"><IMG onmouseover="bbc_highlight(this, true);" title="ใส่ลีสต์" style="BACKGROUND-IMAGE: url(../images/bbcode/bbc_bg.gif); MARGIN: 1px 2px 1px 1px"onmouseout="if (window.bbc_highlight) bbc_highlight(this, false);" height="22" alt="ใส่ลีสต์" src="../images/bbcode/list.gif" width="23" align="bottom" border="0"></a>
<a onclick="surroundText('[code=php]\n', '\n[/code]', document.forms.frmMain.detail); return false;" href="javascript:void(0);"><img src="../images/bbcode/phpcode.gif" alt="Insert PHP Code" title="Insert PHP Code" width="50" height="50" border="0"></a> </td>
</tr>
<tr>
<td colspan="3" valign="top"><select name="select" style="width:160px;MARGIN-BOTTOM: 1ex" onChange="surroundText('[color=' + this.options[this.selectedIndex].value.toLowerCase() + ']', '', document.forms.frmMain.detail); this.selectedIndex = 0; document.forms.frmMain.detail.focus(document.forms.frmMain.detail.caretPos);">
<option value="" selected>เปลี่ยนสี</option>
<option value="Black">สีดำ/ขาว</option>
<option value="Red">สีแดง</option>
<option value="Yellow">สีเหลือง</option>
<option value="Pink">สีชมพู</option>
<option value="Green">สีเขียว</option>
<option value="Orange">สีส้ม</option>
<option value="Purple">สีม่วง</option>
<option value="Blue">สีนํ้าเงิน/ฟ้า</option>
<option value="Beige">สีเทา</option>
<option value="Brown">สีน้ำตาล</option>
<option value="Teal">สีเขียวฟ้า</option>
<option value="Navy">สีกรมท่า</option>
<option value="Maroon">สีเลือดนก</option>
<option value="LimeGreen">สีเหลืองอมเขียว</option>
</select>
<select onchange="changeEmo(this.value)" style="width:130px;margin-bottom: 1ex">
<option value="1">Emotione1</option>
<option value="2">Emotione2</option>
<option value="3">Emotione3</option>
</select>
</td>
</tr>
<tr>
<td colspan="3">
<div id="emotion">
<a onclick="replaceText(':r1:', document.forms.frmMain.detail); return false;" href="javascript:void(0);"><img src="../images/bbcode/r1.gif" alt=":r1:" border="0" title=":r1:" /></a>
<a onclick="replaceText(':r2:', document.forms.frmMain.detail); return false;" href="javascript:void(0);"><img src="../images/bbcode/r2.gif" alt=":r2:" border="0" title=":r2:" /></a>
<a onclick="replaceText(':r3:', document.forms.frmMain.detail); return false;" href="javascript:void(0);"><img src="../images/bbcode/r3.gif" alt=":r3:" border="0" title=":r3:" /></a>
<a onclick="replaceText(':r4:', document.forms.frmMain.detail); return false;" href="javascript:void(0);"><img src="../images/bbcode/r4.gif" alt=":r4:" border="0" title=":r4:" /></a>
<a onclick="replaceText(':r5:', document.forms.frmMain.detail); return false;" href="javascript:void(0);"><img src="../images/bbcode/r5.gif" alt=":r5:" border="0" title=":r5:" /></a>
<a onclick="replaceText(':r6:', document.forms.frmMain.detail); return false;" href="javascript:void(0);"><img src="../images/bbcode/r6.gif" alt=":r6:" border="0" title=":r6:" /></a>
<a onclick="replaceText(':r7:', document.forms.frmMain.detail); return false;" href="javascript:void(0);"><img src="../images/bbcode/r7.gif" alt=":r7:" border="0" title=":r7:" /></a>
<a onclick="replaceText(':r8:', document.forms.frmMain.detail); return false;" href="javascript:void(0);"><img src="../images/bbcode/r8.gif" alt=":r8:" border="0" title=":r8:" /></a>
<a onclick="replaceText(':r9:', document.forms.frmMain.detail); return false;" href="javascript:void(0);"><img src="../images/bbcode/r9.gif" alt=":r9:" border="0" title=":r9:" /></a>
<a onclick="replaceText(':r10:', document.forms.frmMain.detail); return false;" href="javascript:void(0);"><img src="../images/bbcode/r10.gif" alt=":r10:" border="0" title=":r10:" /></a>
<a onclick="replaceText(':r11:', document.forms.frmMain.detail); return false;" href="javascript:void(0);"><img src="../images/bbcode/r11.gif" alt=":r11:" border="0" title=":r11:" /></a>
</div>
</td>
</tr>
<tr>
<td colspan="3" class="font2">Detail : <span class="red">*</span> [ รายละเอียด ]</td>
</tr>
<tr>
<td colspan="3"><textarea cols="120" name="detail" rows="10" ></textarea></td>
</tr>
<tr>
<td colspan="3" style="height:10px;"></td>
</tr>
<tr>
<td width="51%"> </td>
<td width="26%"><a href="javascript:void(0)" onclick="popup('../upload_pic.html','',750,500)"><img src="../images/insert_pic.png" border="0" title="อัพโหลดภาพ" /></a> <a href="javascript:void(0)" onclick="popup('../upload_file.html','',750,500)"><img src="../images/insert_file.png" border="0" title="อัพโหลดไฟล์" /></a></td>
<td width="23%"></td>
</tr>
<tr>
<td colspan="3" style="height:10px;"></td>
</tr>
<tr>
<td colspan="3"><img src="../graphics.php" /> </td>
</tr>
<tr>
<td colspan="3" class="font2"><input type="text" name="captcha" value="" maxlength="4" class="textbox1"/> <span class="red">*</span> ยืนยันรหัสภาพ</td>
</tr>
<tr>
<td colspan="3" style="height:10px;"></td>
</tr>
<tr>
<td colspan="3"><input type="submit" value="Comment" style="width:80px; height:30px;"/></td>
</tr>
</table>
</form>
<? } ?>
</div>
<!-- body end -->
<!-- footer start -->
<div id="footer">
<div class="footer">
<p>Copyright © 2009 Witcom. All Rights Reserved</p>
<br class="spacer" /></div>
</div>
<!-- footer end -->
</body>
</html>
|
|
|
|
|
Date :
2009-11-27 21:01:29 |
By :
pollok |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select onchange="changeEmo(this.value)" style="width:130px;margin-bottom: 1ex">
คนชอบเข้าใจผิดเกี่ยวกับ select กันบ่อยน่ะ this.value หมายถึงค่าใน option แรก
ถึงจะกดเลือกยังอื่นมันก็ส่ง option แรกไปก็ไม่มีการเปลี่ยนแปลงครับ
this.options[this.selectedIndex].value หมายถึงเลือกค่า value option ที่ถูกเลือก
changeEmo(this.options[this.selectedIndex].value)
|
|
|
|
|
Date :
2009-11-27 21:12:52 |
By :
xbeginner01 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
คือมันก็รับค่าได้ปกติน่ะครับ แต่ปัญหาคือ เมื่อมันส่ง emotion ที่พ่วง javascript มาด้วย
มันจะไม่ทำงานครับ
|
|
|
|
|
Date :
2009-11-27 22:47:09 |
By :
pollok |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ไม่ได้ดูคำถามเลยเราโทษทีครับ
emo1 = "<a onclick='replaceText(':r2:', document.forms.frmMain.detail); return false;' href='javascript:void(0);'>
แก้เป็น
emo1 = "<a onclick=\"replaceText(':r2:', document.forms.frmMain.detail); return false;\" href='javascript:void(0);'>
|
|
|
|
|
Date :
2009-11-27 23:20:22 |
By :
xbeginner01 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ใช้ได้แล้วครับ แต่ผมสงสัยว่าทำไมถึงใช้ได้ อธิบายให้เข้าใจทีครับ
|
|
|
|
|
Date :
2009-11-27 23:35:51 |
By :
pollok |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a onclick='replaceText(' มันเข้าใจถึงแค่นี้ครับ
<a onclick=\"replaceText(.....)\" >ทำให้มันเข้าใจถึงคำสั่งสุดท้าย :>
|
|
|
|
|
Date :
2009-11-27 23:45:45 |
By :
xbeginner01 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
เข้าใจเลยครับทีนี้ แล้วปัญหาก่อนๆที่เป็นแบบนี้ก็แก้ได้หมดละครับ ก็นั่งงมโข่งตั้งนาน อิอิ
|
|
|
|
|
Date :
2009-11-28 10:48:09 |
By :
pollok |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 03
|