How to “GET” the right value from a mixed form with different actions?

rejelx

New Member
When I write a form like this:\[code\]<table> <form> <tr> <td><input name="newText" type="text" .../></td> <td><input type="submit" .../></td> </tr> </form> (repeat the above row several times for dynamically generated content)</table>\[/code\]That's incorrect HTML (a warning error is generated in the IDE) and I'm not sure if it will work correctly across all browsers.I can't put them in seperate tables because that just ruins all the formatting; widths of td's vary across each table depending on the content.So then I bring the whole form out of the table like this:\[code\]<form><table> <tr> <td><input type="text" name="newText"/></td> <td><input type="submit" name="action" value="http://stackoverflow.com/questions/10542007/action1"/></td> </tr> (repeat rows several times with different values for the 'action' button)</table></form>\[/code\]Now the problem is that, the last generated record rubs over the \[code\]newText\[/code\] value, and so when the form is submitted from the first row, the submitted params look like this:\[quote\] newText = text1
action = action1
newText = text2
newText = text3
newText = text4 \[/quote\]So I know that I need to perform \[code\]action1\[/code\] but all I ever get is \[code\]text4\[/code\] as the value!How do I get the right value?
 
Back
Top