Solved

Row index of html table

Posted on 2004-09-30
6
566 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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Google Maps with Webforms 1 43
Query in AngularJS 8 77
e commerce steps shown instead of self testing 2 49
How do I "share" on social sites? 2 31
Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

740 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