<? $sqlprice = "select max(price_id) as price_id from tb_price"; $resultprice= mysql_query($sqlprice); $recordprice = mysql_fetch_array($resultprice); $max_idprice = $recordprice['price_id']; ?>
<script language="javascript"> function CreateSelectOption(ele) { var objSelect = document.getElementById(ele); var Item = new Option("", ""); objSelect.options[objSelect.length] = Item; <? while($recordtn = mysql_fetch_array($resultn)) { ?> var Item = new Option("<?=$recordtn["length_th"];?>", "<?=$recordtn["length_id"];?>"); objSelect.options[objSelect.length] = Item; <? } ?> } function CreateNewRow() { var intLine = parseInt(document.frmMain.hdnMaxLine.value); intLine++; var theTable = document.getElementById("tbExp"); var newRow = theTable.insertRow(theTable.rows.length) newRow.id = newRow.uniqueID var newCell //*** Column 1 ***// newCell = newRow.insertCell(0); newCell.id = newCell.uniqueID; newCell.setAttribute("className", "css-name"); newCell.innerHTML = "ผมต้องการที่จะใส่ Loop ID ตรงนี้ครับ"; //*** Column 1 ***// newCell = newRow.insertCell(1); newCell.id = newCell.uniqueID; newCell.setAttribute("className", "css-name"); newCell.innerHTML = "<SELECT NAME=\"length_id"+intLine+"\" ID=\"length_id"+intLine+"\"></SELECT>"; //*** Column 2 ***// newCell = newRow.insertCell(2); newCell.id = newCell.uniqueID; newCell.setAttribute("className", "css-name"); newCell.innerHTML = "<INPUT TYPE=\"TEXT\" SIZE=\"5\" NAME=\"price"+intLine+"\" ID=\"price"+intLine+"\" VALUE=\"\">"; //*** Create Option ***// CreateSelectOption("length_id"+intLine) document.frmMain.hdnMaxLine.value = intLine; } function RemoveRow() { intLine = parseInt(document.frmMain.hdnMaxLine.value); if(parseInt(intLine) > 0) { theTable = document.getElementById("tbExp"); theTableBody = theTable.tBodies[0]; theTableBody.deleteRow(intLine); intLine--; document.frmMain.hdnMaxLine.value = intLine; } } </script>
function CreateNewRow(row) { }
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง