JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old October 22nd, 2006, 03:22 AM
proxies proxies is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2006
Posts: 3 proxies User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 51 m 12 sec
Reputation Power: 0
How can I send parameter from each row to ajax?

For example I have 3 rows in table

<table >
<tr><td>Column 1</td><td><input typ='text' name='status' value='0'></td><td><a href='#' onclick='sendToAjax()'>Update</a></td></tr>
<tr><td>Column 1</td><td><input typ='text' name='status' value='1'></td><td><a href='#' onclick='sendToAjax()'>Update</a></td></tr></table>

I would like to send value from status row by row to ajax script how can I do?

Reply With Quote
  #2  
Old October 26th, 2006, 03:26 PM
colton22's Avatar
colton22 colton22 is offline
\ ^_^ / - Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2006
Location: near chicago, Illinois
Posts: 472 colton22 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 1 h 14 m 46 sec
Reputation Power: 3
Send a message via AIM to colton22 Send a message via MSN to colton22 Send a message via Yahoo to colton22
yes there is a way...
(this file is an full html file i used to create it)

File name: test.html
Code:
<HTML>
<HEAD>
<SCRIPT>
function getNames() {
var ibms=window.document.getElementsByName('status');
var vals=new Array();
for (var x=0;x<ibms.length;x++) {vals[x]=ibms[x].value;}
alert(vals[0]+"     "+vals[1]+"         "+vals[2]+"          "+vals[3]); // use this to test
}
</SCRIPT>
<BODY>
<INPUT TYPE="text" VALUE="thisisnumberone" NAME="status" />
<INPUT TYPE="text" VALUE="thisisnumbertwo" NAME="status" />
<INPUT TYPE="text" VALUE="thisisnumberthree" NAME="status" />
<INPUT TYPE="text" VALUE="thisisnumberfour" NAME="status" />
<INPUT TYPE="text" VALUE="thisisnumberfive" NAME="status" />
<INPUT TYPE="button" VALUE="getInfo" onclick="getNames()" />
</BODY>
</HTML>


hope this helped!!!

colton22

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > How can I send parameter from each row to ajax?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway