|
![](/images/resource/spacer.gif) |
|
อยากสอบถามพี่ๆเกี่ยวกับการตั้งเงื่อนไขให้ button disable หน่อยครับผม |
|
![](/images/resource/viewboard_01.gif?v=1001) |
|
|
![](/images/resource/viewboard_03.gif?v=1001) |
![](/images/resource/viewboard_04.gif?v=1001) |
|
ขั้นตอน
1 คิวรี่ รายการยืมคืนมาก่อน
2 แสดง disable button จากจำนวนที่ได้
3 แสดงรายการยืมคืน
|
![](/images/resource/blockviewtopic_01.gif?v=1001) |
![](/images/resource/blockviewtopic_02.gif?v=1001) |
![](/images/resource/blockviewtopic_03.gif?v=1001) |
![](/images/resource/blockviewtopic_04.gif?v=1001) |
Date :
2016-10-16 07:23:10 |
By :
Chaidhanan |
|
![](/images/resource/blockviewtopic_06.gif?v=1001) |
![](/images/resource/blockviewtopic_07.gif?v=1001) |
![](/images/resource/blockviewtopic_08.gif?v=1001) |
![](/images/resource/blockviewtopic_09.gif?v=1001) |
|
|
![](/images/resource/viewboard_06.gif?v=1001) |
![](/images/resource/viewboard_07.gif?v=1001) |
|
![](/images/resource/viewboard_08.jpg?v=1001) |
![](/images/resource/viewboard_09.gif?v=1001) |
![](/images/resource/viewboard_01.gif?v=1001) |
|
|
![](/images/resource/viewboard_03.gif?v=1001) |
![](/images/resource/viewboard_04.gif?v=1001) |
|
่javascript(jquery)
if($("td:contains('ยังไม่คืน')").length > 2){
$('#button-borrow').prop('disabled', true);
}else{
$('#button-borrow').prop('disabled', false);
}
|
|
|
![](/images/resource/viewboard_06.gif?v=1001) |
![](/images/resource/viewboard_07.gif?v=1001) |
|
![](/images/resource/viewboard_08.jpg?v=1001) |
![](/images/resource/viewboard_09.gif?v=1001) |
![](/images/resource/viewboard_01.gif?v=1001) |
|
|
![](/images/resource/viewboard_03.gif?v=1001) |
![](/images/resource/viewboard_04.gif?v=1001) |
|
ตอนนี้สามารถทำได้แล้วครับผม มีคนรู้จักมาช่วยดูและแก้ให้ ขอบคุณทุกๆคนมากครับผม
Code (PHP)
<a href="3.8.1YeumForm.php?userid=<?=$objResult["userid"];?>">
<input type="button" name="yeum"
<?
$strSQL = "SELECT * FROM yeumkuendata WHERE userid = '".$_GET["userid"]."' AND statusyk = 'ยังไม่คืน' ";
$objDB = mysql_select_db("projectweb");
$objQuery = mysql_query($strSQL);
$numyuem = mysql_num_rows($objQuery);
if($numyuem >= 3){
echo 'disabled';}?> id="yeum" value="ทำรายการยืม" /></a>
|
ประวัติการแก้ไข 2016-10-16 23:05:20
![](/images/resource/blockviewtopic_01.gif?v=1001) |
![](/images/resource/blockviewtopic_02.gif?v=1001) |
![](/images/resource/blockviewtopic_03.gif?v=1001) |
![](/images/resource/blockviewtopic_04.gif?v=1001) |
Date :
2016-10-16 23:05:02 |
By :
sephiroht |
|
![](/images/resource/blockviewtopic_06.gif?v=1001) |
![](/images/resource/blockviewtopic_07.gif?v=1001) |
![](/images/resource/blockviewtopic_08.gif?v=1001) |
![](/images/resource/blockviewtopic_09.gif?v=1001) |
|
|
![](/images/resource/viewboard_06.gif?v=1001) |
![](/images/resource/viewboard_07.gif?v=1001) |
|
![](/images/resource/viewboard_08.jpg?v=1001) |
![](/images/resource/viewboard_09.gif?v=1001) |
|
|
|
![](/images/digitalocean-banner.jpg)
|
Load balance : Server 00
|