Jump to content

deib97

Members
  • Posts

    34
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Age
    30

Contact Methods

  • Yahoo
    deib97
  • Skype
    deib97

deib97's Achievements

Member

Member (2/5)

0

Reputation

  1. Hello, i have source code like this : <script type="text/javascript"> var rowNum = 0; function addRow(frm) { rowNum ++; var row = '<p id="rowNum'+rowNum+'">Item name: <input type="text" name="name[]" value="'+frm.add_name.value+'"> Satuan: <input type="text" size="5" name="satuan[]" value="'+frm.add_satuan.value+'"> Item quantity: <input type="text" name="qty[]" size="20" value="'+frm.add_qty.value+'"> <input type="button" value="Remove" onclick="removeRow('+rowNum+');"></p>'; jQuery('#itemRows').append(row); frm.add_qty.value = ''; frm.add_name.value = ''; frm.add_satuan.value = ''; } function removeRow(rnum) { jQuery('#rowNum'+rnum).remove(); } </script> This code, for make dynamic row when add operation. Then, item name is input text. How change this input : <select name="group" class='arial11' id="group"> <?php $qdepart = mysql_query("select * from pemakai_group order by group_name asc"); if($qdepart != null){ while($ddepart = mysql_fetch_array($qdepart)){ $no++; if( $data[id_group] == $ddepart[id_group] ){ $seldepart[$no] = "selected";} echo "<option value=\"$ddepart[id_group]\" $seldepart[$no]>$ddepart[group_name]</option>"; } } ?> </select>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.