?
Solved

Row index of html table

Posted on 2004-09-30
6
Medium Priority
?
572 Views
Last Modified: 2012-06-21
I have a html table which gets dynamically filled with text boxes and buttons. Each row has few text boxes and a button.
Click on the buttons opens a pop up window from which they select data which is passed back to original form.

I need to know the row index of the table so that selected data gets pasted into the correct row.

Thanks
0
Comment
Question by:PARADIGM_USER
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 15

Expert Comment

by:praneetha
ID: 12191104
i guess you should pass it as a parameter to the popupwindow...and pass it back when it returns data...
0
 

Author Comment

by:PARADIGM_USER
ID: 12191145
yes. Thats what i am trying to do. How do i get the row index value of html table?
0
 
LVL 15

Expert Comment

by:praneetha
ID: 12191190
can u post the code where you are opening a new window at that button click...

0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:PARADIGM_USER
ID: 12191311
Here's the code.

<TABLE id="Table4" cellSpacing="1" cellPadding="1" width="300" border="1">
<TR>
<td></td>
<TD>Col1</TD>
<TD>Col2</TD>
<TD>Col3</TD>
<TD>Col4</TD>
<TD>Col5</TD>
</TR>
<% for i = 1 to 2%>
<TR>
<TD><A href="javascript:my_window=window.open('webform1.aspx?formname=Form1.TextBox1','my_window','width=300,height=300');my_window.focus();">Select</A></TD>
<TD><INPUT type="text"></TD>
<TD><INPUT type="text"></TD>
<TD><INPUT type="text"></TD>
<TD><INPUT type="text"></TD>
<TD><INPUT type="text"></TD>
<%next i %>
</TR>
</TABLE>
0
 
LVL 3

Expert Comment

by:w_shaila
ID: 12191456
with reference to ur a if u want to find the rowindex , u can do like this

this.parentElement.parentElement.parentElement.rowIndex;

this = hyeperlink
this.parentElement= TD
this.parentElement.parentElement = TR
this.parentElement.parentElement.parentElement = Table

finally u can get rowIndex of the table by using the property rowIndex.

if u need any clarificatrions , let me know
0
 
LVL 15

Accepted Solution

by:
praneetha earned 750 total points
ID: 12191494
window.open('webform1.aspx?formname=Form1.TextBox1&rowid='+<% i%>

if yoy are printing the return value from webform1.aspx in the textbox1..which is a textbox which corresponds to the same row...then you don't have to worry about row index right?
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question