javascript - Getting values from database on select dropdown in textbox -


please answer below question

i want details database on select of option , display values of related select option accordingly

 <table border="1" class="form" id="datatable">             <tbody>                 <tr class="vd_bg-green vd_white" id='row_0'>                     <td><input name="chk" type="checkbox"></td>                     <td><select id="product_name" name="product_name" oninput=                     "calculate('row_0')" required="" style="width: 180px; color: black">                     <option>//options database</option>                     </select></td>                     <td><input id="description" maxlength="70" name="description" oninput=                     "calculate('row_0')" required="" style="width: 260px; color: black" type=                     "text"></td>                     <td><input id="price" name="price" oninput="calculate('row_0')" required=""                     style="width: 80px; color: black" type="text"></td>                     <td><input id="quantity" name="quantity" oninput="calculate('row_0')"                     required="" style="width: 40px; color: black" type="text"></td>                     <td><input id="disc_rate" name="disc_rate" oninput="calculate('row_0')"                     required="" style="width: 40px; color: black" type="text"></td>                     <td><input id="total_pro" name="total_pro" onchange="calculate('row_0')"                     readonly="readonly" style="width: 80px; color: black" type="text"></td>                 </tr>             </tbody>         </table> 

you can start learning ajax , server side scripting. create server side code. pass selected value ajax. results database. show result in text box.


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -