Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 30th, 2007, 04:30 AM
Authorized User
 
Join Date: Jun 2003
Location: Gent, , Belgium.
Posts: 57
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Kabe
Default get INPUT value within TD

the html-code:
<tr><td>a</td><td>b</td><td><input type="text"></td></tr>
<tr><td>c</td><td>d</td><td><input type="text"/></td></tr>
<tr><td>e</td><td>f</td><td><input type="text"></td></tr>

problem:
i need only the value of td's in each tr-row when there's a value filled in in the input field.
suppose in first and last tr there's a value for 'input' i have to get this result: a:b:inputvalue|e:f:inputvalue|

where ':' is divider between rowvalues and '|' splitter between each row
Reply With Quote
  #2 (permalink)  
Old May 1st, 2007, 05:00 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Hyderabad, A.P., India.
Posts: 373
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi,

while generating the table give ids to the tds, id value should be like rownumber_columnnumber or any other format so that you can identing tds uniquely and scan through all the tds.
Loop through the tds using javascript and use the childNodes attribute to get the input element reference, check the value of the input element if value is available append it to the string in the format you've mentioned.

Hope it gives a start to you.
Regards,
Rakesh

- Rakesh
Reply With Quote
  #3 (permalink)  
Old May 1st, 2007, 06:50 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

mmmmmm, the question and resone both confuse me...

Wind is your friend
Matt
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
TD Color Change echovue Javascript How-To 1 March 3rd, 2006 03:40 AM
CSS for td. rupen CSS Cascading Style Sheets 2 September 6th, 2005 10:14 AM
MAX and MIN ON TD cleytonjordan XSLT 7 July 27th, 2005 12:39 PM
td abbr crmpicco HTML Code Clinic 6 June 14th, 2005 08:27 AM
LENGTH OF TD viren_balaut Javascript How-To 1 September 8th, 2004 08:43 AM



All times are GMT -4. The time now is 06:00 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.