Solved

Row index of html table

Posted on 2004-09-30
6
561 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

809 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