lional Posted November 2, 2006 Share Posted November 2, 2006 Hi AllI am trying to create a form that has five fields, when all the fields have been filled in and either tab or enter is hit, a new line must appear with the same 5 fields..I would like the name and id of each input to be dynamically assigned.I am very new to javascript so i have no idea where to start.Could somebody please point me in the right directionhere is my code so far:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>Returns</title></head><body><table summary=""><tr><td>Name</td><td>Address</td><td>Tel</td><td>Fax</td><td>Email Address</td></tr><tr><td><input id="name" name="name" type="text" value=""></td><td><input id="address" name="address" type="text"value=""></td><td><input id="tel" name="tel" type="text"value=""></td><td><input id="fax" name="fax" type="text"value=""></td><td><input id="mail" name="mail" type="text"value=""></td></tr><td><input type="submit" name="submit" value="Submit" </table></body></html>ThanksLional Quote Link to comment Share on other sites More sharing options...
fenway Posted November 2, 2006 Share Posted November 2, 2006 Well, you'll have to handle a few things:1) an onblur handler for each field that checks to see whether the other named fields are completed or not;2) A list of all the fields to be checked;3) A way of uniquely addressing each set;4) Some JS DOM methods to write out a new row.5) A key handler to capture tab/enter characters so that the form doesn't get submitted. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.