Jump to content

dynamic forms and determining element index


drkstr

Recommended Posts

First of all, sorry if I seem curt, but it's late and my coding momentum ground to a halt as soon as I needed to do something in javascript (which I'm pretty sure is the devil's creation).

Anyways, I have a fairly large form which consists of a long list of identical elements. For example, let's say my form has 10 lines, and each line contains the same 5 uniquely named form elements. So when submitted, the server side script will basically get a matrix of form elements (an array of the first element, an array of the second element, etc.). When any particular element on any particular line is changed, clicked, whatever, I need to be able to modify other elements on the same line. Furthermore, I don't think I can loop through the entire list to find the element being worked on because some of the lines could contain the same value for that element.  I have spent the past few hours digging though my javascript book (which is the biggest programming book I have by the way), and have come to the conclusion that javascript is completely useless for any real coding.

Can anyone recommend some strategies for working on dynamically created form elements with such a "static" language? Any advice you can give me will probably add a year to this poor programmers life span.

Thanks in advance!
...aaron


PS: I can post code if you would like, but I am more interested in general strategies then a specific solution.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.