Note that there are some explanatory texts on larger screens.

plurals
  1. POdisplay multiple table
    primarykey
    data
    text
    <p>I have two radio buttons with values itemwise and supplierwise. If I select itemwise then i should display one table and if i select supplierwise then i should display another table. My coding is displaying the tables correctly but the tables are not displayed in same position. To display them in same position what should i do? My code is given below-----</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script language="javascript"&gt; function hideTable() { document.getElementById('item_table').style.visibility = "hidden"; document.getElementById('supplier_table').style.visibility = "hidden"; } function showItemTable() { if(document.getElementById("item_selection").checked==true) { document.getElementById('supplier_table').style.visibility = "hidden"; document.getElementById('item_table').style.visibility = "visible"; } } function showSupplierTable() { if(document.getElementById("supplier_selection").checked==true) { document.getElementById('item_table').style.visibility = "hidden"; document.getElementById('supplier_table').style.visibility = "visible"; } } &lt;/script&gt; &lt;/head&gt; &lt;body onload="javascript:hideTable()"&gt; &lt;form name = "form1" method ="post" action=""&gt; &lt;table border="1" align="center"&gt; &lt;tr&gt; &lt;td&gt;Report Required&lt;/td&gt; &lt;td&gt;&lt;input type="radio" name="item_selection" id="item_selection" onclick="showItemTable()"&gt;Item Wise&lt;/td&gt; &lt;td&gt;&lt;input type="radio" name="item_selection" id="supplier_selection" onclick="showSupplierTable()"&gt;Supplier Wise&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;table border="1" bgColor="#9999CC" align="center" id="item_table"&gt; &lt;tr&gt; &lt;td colspan="2"&gt;Item Type&lt;/td&gt; &lt;td colspan="2"&gt;&lt;%=item_typeddListStr%&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="2"&gt;Item Category&lt;/td&gt; &lt;td colspan="2"&gt;&lt;%=item_categoryddListStr%&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="2"&gt;Item Name&lt;/td&gt; &lt;td colspan="2" id='item_code'&gt; &lt;select name='item_code' &gt; &lt;option value='-1'&gt;&lt;/option&gt; &lt;/select&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;From Date&lt;/td&gt; &lt;td&gt;&lt;input type="text" name="indent_date" id="issue_date_first" size="12"/&gt;&lt;/td&gt; &lt;td&gt;To Date&lt;/td&gt; &lt;td&gt;&lt;input type="text" name="indent_date" id="issue_date_second" size="12"/&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="1"&gt;&lt;input type ="submit" name ="submit" value ="Get Records" onclick="return validate()"&gt;&lt;/td&gt; &lt;td colspan="1"&gt;&lt;input type ="submit" name ="submit" value ="Generate Report" onclick="return validate()"&gt;&lt;/td&gt; &lt;td colspan="1"&gt;&lt;input type ="submit" name ="submit" value ="Clear Form"&gt;&lt;/td&gt; &lt;td colspan="1"&gt;&lt;input type ="submit" name ="submit" value ="Back"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;table border="1" bgColor="#9999CC" align="center" id="supplier_table"&gt; &lt;tr&gt; &lt;td colspan="2"&gt;Supplier Name&lt;/td&gt; &lt;td colspan="2"&gt;&lt;%=supplier_codeddListStr%&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="1"&gt;&lt;input type ="submit" name ="submit" value ="Get Records" onclick="return validate()"&gt;&lt;/td&gt; &lt;td colspan="1"&gt;&lt;input type ="submit" name ="submit" value ="Generate Report" onclick="return validate()"&gt;&lt;/td&gt; &lt;td colspan="1"&gt;&lt;input type ="submit" name ="submit" value ="Clear Form"&gt;&lt;/td&gt; &lt;td colspan="1"&gt;&lt;input type ="submit" name ="submit" value ="Back"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload