Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

select row from table

Status
Not open for further replies.

cylly

Programmer
Oct 17, 2002
23
CA
I would like to know how to, after highlighting a row in a table, click the submit button from a different frame and know which row is selected so that I can open a new page with details of the row selected.
Here is my table.
<TABLE border=1>
<TR>
<b>
<TH>Table Name</TH>
<TH>Description</TH>
</b>
</TR>
<p font-size=10>
<pr:iterator results=&quot;tableList&quot; >
<TR onClick=&quot;highlightTR('#c9cc99','cc3333');&quot;>
<TD><pr:field name=&quot;table_nm&quot;/></TD>
<TD><pr:field name=&quot;table_descv_txt&quot;/></TD>
<TD>
<form name=&quot;<pr:field name=&quot;table_nm&quot;/>&quot; >
<input type=hidden name=tName value=&quot;<pr:field name=&quot;table_nm&quot;/>&quot;>
<input type=hidden name=tDesc value=&quot;<pr:field name=&quot;table_descv_txt&quot;/>&quot;>
<input type=hidden name=tNum value=&quot;<pr:field name=&quot;generic_table_num&quot;/>&quot;>
</form>
</TD>
</TR>
</pr:iterator>
</TABLE>

Any help would be greatly appreciated. Thanks.
 
Why don't you put a radio button next to each row. That is more intuitive than having the user highlight a row. Then open the page relevant to which button is checked.

Something like:

Code:
<head>
<script language=&quot;JavaScript&quot; type=&quot;text/JavaScript&quot;>
<!--
function openWindow(url,winName,features) {
  window.open(url,winName,features);
}
//-->
</script>
</head>

<body>
<form name=&quot;form&quot; method=&quot;post&quot; action=&quot;javascript:openWindow(document.form.win.value,'newwin','width=250,height=250')&quot;>
  <p>1 
    <input name=&quot;win&quot; type=&quot;radio&quot; value=&quot;index1.html&quot; checked>
  </p>
  <p>2 
    <input type=&quot;radio&quot; name=&quot;win&quot; value=&quot;index2.html&quot;>
  </p>
  <p>3 
    <input type=&quot;radio&quot; name=&quot;win&quot; value=&quot;index3.html&quot;>
  </p>
  <p>
    <input type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot;Submit&quot;>
  </p>
</form>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top