|
 |
|
รันใน chrome & firefox ได้ แต่ใน ie ไม่ได้ค่ะ เป็นการทำ listbox 2 ชั้นค่ะ รบกวนด้วยค่ะ |
|
 |
|
|
 |
 |
|
แก้ได้แล้วนะคะ เกิดจาก 1) มันเป็น select ซ้อน select และ 2) ie ไม่รองรับการใช้ {document.getElementById('ddlstoreid').innerHTML = Option_01; จึงแก้ไขตามนี้แล้วใช้ได้ค่ะCode (PHP)
<script type="text/javascript">
$(function() {
$("#date").datepicker({
showWeek: true,
changeMonth: true,
changeYear: true,
dateFormat: 'yy-mm-dd'
});
});
var Option_01 = "<?php foreach($storeid1 as $key) {echo '<option>'.$key['INSTANCE_NAME'];} ?>"
var Option_02 = "<?php foreach($storeid2 as $key) {echo '<option>'.$key['INSTANCE_NAME']; } ?>"
var Option_03 = "<?php foreach($storeid3 as $key) {echo '<option>'.$key['INSTANCE_NAME']; } ?>"
var Option_04 = "<?php foreach($storeid4 as $key) {echo '<option>'.$key['INSTANCE_NAME']; } ?>"
function ChangeOption1(value) {
if (value == 01) {$("#ddlstoreid").html(Option_01); }
else if (value == 02) {$("#ddlstoreid").html(Option_02); }
else if (value == 03) {$("#ddlstoreid").html(Option_03); }
else if (value == 04) {$("#ddlstoreid").html(Option_04); }
}
</script>
<?php echo form_open($submenu[0]['URL']); ?>
<table>
<tr>
<td>
<td >Stroe Type :
<select name="select_type" class="MyForm" id="select_type" onChange="ChangeOption1(this.value)">
<option value="">Select Store Type</option>
<option value="1">Hyper Store</option>
<option value="2">Value Store</option>
<option value="3">Super Store</option>
<option value="4">Express Store</option>
</select></td>
<td >
Store Id :<select id="ddlstoreid" name="ddlstoreid" style="width:200px"></select>
</td>
<td>
Date: <input type="text" name="date" id="date" />
</td>
<td width="9%"> <input type="submit" name="Submit" value="Show Report" /> </td>
</td>
</tr>
</table>
<?php echo form_close(); ?>
|
 |
 |
 |
 |
Date :
2011-11-11 22:44:20 |
By :
Mminnano |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 03
|