Chris Taylor wrote:
I could do what other frameworks I've worked
with do and wrap the whole table in a form
and name elements with a parseable delimiter...
<input type="text" name="foo$row$1" ... />
This is the type of solution I've used in the past, and then put the "save"
button in the last column of each row, ideally with something like this:
<button type="submit" name="action" value="123">Save row</table>
Where the value "123" is the number of the row that should be saved. My
server-side script then takes that number and gets all form fields where the
name ends with "_123" (or similar). The major problem with this is that IE
messes up the value of <button> elements, so I've generally used this:
<input type="submit" name="action" value="Save row #123">
Then the server-side script takes the value of the "action" form field,
parses out the "Save row #" and uses the number that's left. It's not pretty
but it's the best I could come up with and it seems to have worked for a lot
of apps.
By the way, using that method you could also have <input type="submit"
name="action" value="Save all rows"> at the top/bottom of the table which
the server-side script would then know to loop all form fields and save them
all. More complicated code-wise, but useful for users.
Hope that helps
Thanks for actually reading my entire post.. Yeah, I I was sorta hoping
to avoid this.. In this case I don't care about semantics as much as not
having to do funky backend parsing and fighting css bugs because of the
naming conventions in my controls.. Thankfully this will never see
production and just reminds me of the hackish days from the past..
./C
*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************