Note that there are some explanatory texts on larger screens.

plurals
  1. POunable to get elements passed from html
    primarykey
    data
    text
    <p>i'm having the below jsp page created.</p> <pre><code>&lt;%@page contentType="text/html" pageEncoding="UTF-8"%&gt; &lt;html&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt; &lt;title&gt;JSP Page&lt;/title&gt; &lt;script type="text/javascript"&gt; function show(x) { document.getElementById(x).style.display='block'; } function hide(x) { document.getElementById(x).style.display='none'; } function handleKeyEvent(e) { var charCode; if (e &amp;&amp; e.which) { charCode = e.which; } else if (window.event) { e = window.event; charCode = e.keyCode; } if (charCode == 13) { //document.getElementById("yourForm").submit(); var m=document.getElementById(e); alert(m); hide(x); } } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;form name="form1" method="post" action="abc.jsp"&gt; &lt;table width="722"&gt; &lt;tr&gt; &lt;td width="431" height="190"&gt; &lt;table width="439" &gt; &lt;tr&gt; &lt;td width="129"&gt;PARTS Updated&lt;/td&gt; &lt;td width="108"&gt;&lt;p&gt; &lt;select name="PARTS_Updated" id="PARTS_Updated" &gt; &lt;option value=""&gt;&lt;/option&gt; &lt;option value="N/A"&gt;N/A&lt;/option&gt; &lt;/select&gt; &lt;/p&gt;&lt;/td&gt; &lt;td width="186"&gt;&lt;label for="PARTS_Updated"&gt;&lt;/label&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;TSI OK&amp;#13;&lt;/td&gt; &lt;td&gt;&lt;p&gt; &lt;input type="radio" name="radio" id="TSI_N/A" value="TSI_N/A" onClick="hide('TSI_Query_Box')"&gt; N/A &lt;/p&gt; &lt;p&gt; &lt;input type="radio" name="radio" id="TSI_Query" value="TSI_Query" onClick="show('TSI_Query_Box')"&gt; TSI Query&lt;/p&gt;&lt;/td&gt; &lt;td&gt;&lt;label for="TSI_Query_Box"&gt;&lt;/label&gt; &lt;textarea name="TSI_Query_Box" id="TSI_Query_Box" cols="15" rows="5" style="display:none" onkeypress="handleKeyEvent('TSI_Query_Box')"&gt;&lt;/textarea&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td height="65"&gt;Special Ins OK&amp;#13;&lt;/td&gt; &lt;td&gt;&lt;p&gt; &lt;input type="radio" name="radio" id="SI_N/A" value="TSI_OK" onClick="hide('SI_Query_Box')"&gt; N/A &lt;/p&gt; &lt;p&gt; &lt;input type="radio" name="radio" id="SI_Query" value="SI_Query" onClick="show('SI_Query_Box')"&gt; SI Query&lt;/p&gt;&lt;/td&gt; &lt;td&gt;&lt;label for="SI_Query_Box"&gt;&lt;/label&gt; &lt;textarea name="SI_Query_Box" id="SI_Query_Box" cols="15" rows="5" style="display:none" onkeypress="handleKeyEvent('SI_Query_Box')"&gt;&lt;/textarea&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;&lt;/td&gt; &lt;td width="279"&gt; &lt;table width="279" align="center"&gt; &lt;tr&gt; &lt;td width="87"&gt;&lt;p&gt;Shipment ID&amp;#13;&lt;/p&gt;&lt;/td&gt; &lt;td width="97"&gt;&lt;label for="Ship_ID"&gt;&lt;/label&gt; &lt;input type="text" name="Ship_ID" id="Ship_ID"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;table width="721" border="1"&gt; &lt;tr&gt; &lt;td width="374" align="center"&gt; &lt;input type="submit" name="Send for CT Review (SCTR)" id="Send for CT Review (SCTR)" value="Send for CT Review (SCTR)"&gt;&lt;/td&gt; &lt;td width="331" align="center"&gt; &lt;input type="submit" name="CT Review Complete (CTRC" id="CT Review Complete (CTRC)" value="CT Review Complete (CTRC)"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align="center"&gt; &lt;input type="submit" name="Cleanup Queries" id="Cleanup Queries" value="Cleanup Queries"&gt;&lt;/td&gt; &lt;td align="center"&gt; &lt;input type="submit" name="Cleanup Complete" id="Cleanup Complete" value="Cleanup Complete"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="2" align="center"&gt;&lt;input type="submit" name="Go_To_Main_Page" id="Go_To_Main_Page" value="Go To Main Page"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;/form&gt; &lt;h1&gt;&amp;nbsp;&lt;/h1&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>i wanted to see when i enter the text in textarea and hit enter, i want to see the text assed. in the present case it is alerting a message [object]. Also when i check radio buttons, if i check TSI Query Radio button followed SI Query Radio button or vice versa, both are getting displayed, i want only one textarea to be displayed once.</p> <p>for screenshot you can have a look at this link </p> <p><a href="http://jsfiddle.net/dYy26/" rel="nofollow">http://jsfiddle.net/dYy26/</a></p> <p>Thanks.</p>
    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.
 

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