Solved

Row index of html table

Posted on 2004-09-30
6
556 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
  • 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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 250 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

911 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now