473,386 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Get data from textbox inside a table

Hello,

how can i get data from this table:
<table>
<tr><td>someText</td></tr>
<tr><td>
<input name="DataGrid1:_ctl2:textBox" type="text" value="someText"
id="DataGrid1__ctl2_textBox" style="width:140px;" />
</td></tr>
</table>
for the first column I can use:
var column1 = table.rows[rowIndex].cells[0].childNodes[0].data;
and I get 'someText'

how can I get text from column2 ('someText2')?

Thanks
Nov 15 '07 #1
2 8752
Thomas 'PointedEars' Lahn wrote:
var column1 = [];

for (var c = table.rows[rowIndex].cells[0].childNodes, i = 0;
i < c.length; i++)
{
column1.push(c[0].nodeValue);
Should read

column1.push(c[i].nodeValue);

of course.
}

PointedEars
--
"Use any version of Microsoft Frontpage to create your site. (This won't
prevent people from viewing your source, but no one will want to steal it.)"
-- from <http://www.vortex-webdesign.com/help/hidesource.htm>
Nov 15 '07 #2
On Nov 15, 11:13 am, Thomas 'PointedEars' Lahn <PointedE...@web.de>
wrote:
Thomas 'PointedEars' Lahn wrote:
var column1 = [];
for (var c = table.rows[rowIndex].cells[0].childNodes, i = 0;
i < c.length; i++)
{
column1.push(c[0].nodeValue);

Should read

column1.push(c[i].nodeValue);

of course.
}

PointedEars
--
"Use any version of Microsoft Frontpage to create your site. (This won't
prevent people from viewing your source, but no one will want to steal it.)"
-- from <http://www.vortex-webdesign.com/help/hidesource.htm>
Thanks a lot.
Nov 16 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Vlady | last post by:
Hello. I recently built an ASP.NET "financial" application. I got to the point where I have a HTML template (a contract) which needs to be filled with various data from the database. I put a...
3
by: pmud | last post by:
Hi, I have a web page (asp.net, code:c#). I havean html table with text boxes. Based on the user input , records are displayed in the data grid below it. Now the datagrid has a large no. of...
8
by: Radx | last post by:
Here in my web application, I have a data entry page with serval controls. Some of the controls have autopostback is set true. But the problem is when two or more people are entering data at the...
2
by: rmandel | last post by:
I'm very, very new to .Net but have been doing C/C++ for years. I'm having a great deal of difficulty with something that should be simple. Here's what I'm trying to do.... Display three...
2
by: hooterbite | last post by:
I am using an object datasource to call a stored procedure to update an SQL table. THE STORED PROCEDURE WORKS FINE! THE OBJECTDATASOURCE WORKS FINE! When the textbox is inside a standard HTML tag...
0
by: Jacob Donajkowski | last post by:
Once the user logs in I want to have the users switch from the Roster View to the Profile View and enter their profile infomation and save it. Then the next time they login and go to the Profile...
0
by: wiertara | last post by:
Hi, i have a problem with refreshing data in UpdatePanel. In aspx file i have a AjaxToolKit TabContainer and inside it a UpdatePanel: <asp:UpdatePanel ID="upRemoveUser" runat="server"...
1
by: semomaniz | last post by:
I have a form where i have created the form dynamically. First i manually added a panel control to the web page. Then i added another panel dynamically and inside this panel i created tables. I have...
2
by: semomaniz | last post by:
I have created two tables dynamically and have added textboxes inside the table. now i am trying to retrieve the data from the the textboxes and i am getting a null reference error. I am not sure why...
10
dj12345
by: dj12345 | last post by:
Hi, (Asp.net + Ajax) I am creating a page which will fetch data from server without postbak of a page.. I have 2 controls on this page TextBox and Lable. I have assigned TextBoxWatermark...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.