<script language = "JavaScript"> function List_type(SelectValue) { form2.spechee.length = 0 //*** Insert null Default Value ***// var myOption = new Option('','') form2.spechee.options[form2.spechee.length]= myOption <? $intRows = 0; $strSQL = "SELECT * FROM tb_spechee"; $objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]"); $intRows = 0; while($objResult = mysql_fetch_array($objQuery)) { $intRows++; ?> x = <?=$intRows;?>; mySubList = new Array(); strGroup = <?=$objResult['ref_t_id'];?>; strValue = "<?=$objResult["s_id"];?>"; strItem = "<?=$objResult["s_name"];?>"; mySubList[x,0] = strItem; mySubList[x,1] = strGroup; mySubList[x,2] = strValue; if (mySubList[x,1] == SelectValue){ var myOption = new Option(mySubList[x,0], mySubList[x,2]) form2.spechee.options[form2.spechee.length]= myOption } <? } ?> } </script>
<tr bgcolor="#FFFFFF"> <td width="208" align="right" class="normal_font style15" scope="row">ประเภทสินค้า <span class="style11">::</span> </td> <td width="498" align="left" class="normal_font"><span class="style11"> <select id="type" name="type" onChange = "List_type(this.value)" style="width:220px"> <option>---------กรุณาเลือกประเภทสินค้า---------</option> <? $strSQL = "SELECT * FROM tb_type"; $objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]"); while($objResult = mysql_fetch_array($objQuery)) { ?> <option value="<?=$objResult["t_id"];?>"> <?=$objResult["t_name"];?> </option> <? } ?> </select> * </span></td> </tr> <tr bgcolor="#FFFFFF"> <td align="right" class="normal_font style15" scope="row"><span class="normal_font"><span class="style11"><span class="style20">สายพันธุ์</span> ::</span></span></td> <td align="left" class="normal_font"><select id="spechee" name="spechee" style="width:150px"> </select> </td> </tr>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง