combo box at run time-options generated by foreach
i have added html elements at run time using append
function addFormField()
- {
- $("#inputss").append("<strong>abc</strong>");
- }
but how can i add a select element at run time that looks like this..
- <select name="pre_req" id="pre_req" class="inputs" value=<?if($this->uri->segment(2)=='update') echo $results['pre_req']?>>
- <option value='None'>None</option>
- <? foreach($combo1 as $row)
- echo "<option value=$row[sub_name]>$row[sub_name]</option>";
- ?>
- </select>