Solved

Row index of html table

Posted on 2004-09-30
6
548 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
Comment Utility
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
Comment Utility
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
Comment Utility
can u post the code where you are opening a new window at that button click...

0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:PARADIGM_USER
Comment Utility
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
Comment Utility
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
Comment Utility
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

AJAX ModalPopupExtender has a required property "TargetControlID" which may seem to be very confusing to new users. It means the server control that will be extended by the ModalPopup, for instance, if when you click a button, a ModalPopup displays,…
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

763 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

10 Experts available now in Live!

Get 1:1 Help Now