java - Display more than one div or table content of same id from onchange value -


i'd know if can display more 1 div or table content of same id onchange value. if select option drop down , displays content want display content elsewhere in page when same option selected.

my code follows:

<select name="debitordertype" id = "debitordertype"  onchange="display(this,'bank','card','invoice');"> <option>please select...</option> <option value="bank" selected>debit order (monthly)</option> <option value="card">credit card (monthly)</option> <option value="invoice">invoice (yearly)</option> </select> 

then when selecting invoice dropdown displays following:

<tbody id="invoice" style="display: none;"> <tr> <td class="field">thank selecting pay yearly in advance. doing  receiving 1 month's free listing. </td></tr> </tbody> 

but want display following when invoice selected in part of page:

<tbody id="invoice" style="display: none;"> <tr><td height="5"></td></tr> <tr><td align="right">this discounted yearly price</td></tr>   </tbody> 

but first part showing , not both. looks can't display more 1 content same id.

hope can me?

thanks in advance!

you mustn't define 2 elements same id in html, it's meant unique identifier. classes can used multiple times, use that!


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -