jbrill Posted July 5, 2007 Share Posted July 5, 2007 Im am putting together a small program for a client, part fo this program needs to be able to create steps/order of a job. Basically, I need to be able to "add another step" so lets say i have a table with the following fields that need to be filled and stored in the database: text box : actual hours drop down: category drop down: sub category text box: project time text box: setup time text area: proceedure check box: complete I am able to setup the above form, but i do not know how to have a link at the bottom of it for "add another step" upon clicking that link i need to be able to add the same table/form above, again, into another field in the table in the database. and i need to be able to create about 15 steps total. The problem is, yes i could just make the table huge right form the start, example: project time1, project time 2 and so on. but i would like to only view one table/form first and then upon click "add another step" have another become visible. I dont even knwo where to start... I would really appreciate some advice on this one! thanks! Quote Link to comment Share on other sites More sharing options...
teng84 Posted July 5, 2007 Share Posted July 5, 2007 do you have sample code Quote Link to comment Share on other sites More sharing options...
AndyB Posted July 5, 2007 Share Posted July 5, 2007 You might want to consider adding another field to that database to represent the step # in a procedure. Then for job #1 you may have step 1, 2, 3, and 4 (four records) and for job #2 steps 1-12 (12 records). Retrieving a job procedure in full then needs you to select and display all records with the same job procedure #, ordered by task #. Quote Link to comment Share on other sites More sharing options...
jbrill Posted July 5, 2007 Author Share Posted July 5, 2007 I do not have any real sample code, i was hoping to get some ideas first. here is an example of what the forms will look like though: nope, thats the idea really im trying to come up with some ideas, and then generate some code. <form id="form1" name="form1" method="post" action=""> <table width="100%" border="1"> <tr> <td width="5%"> <label>Actual Time</label></td> <td width="9%">Category</td> <td width="11%">subcategory</td> <td width="6%">machine time</td> <td width="5%">Setup time</td> <td width="39%">Proceedure</td> <td width="25%">Completed</td> </tr> <tr> <td><label> <input name="textfield" type="text" id="textfield" size="3" maxlength="3" /> </label></td> <td><select name="jumpMenu" id="jumpMenu"> <option>category</option> </select></td> <td><select name="jumpMenu2" id="jumpMenu2"> <option>subcategory</option> </select></td> <td><label> <input name="textfield2" type="text" id="textfield2" size="3" maxlength="3" /> </label></td> <td><input name="textfield3" type="text" id="textfield3" size="3" maxlength="3" /></td> <td><label> <textarea name="textarea" id="textarea" cols="45" rows="5"></textarea> </label></td> <td><label> <input type="checkbox" name="checkbox" id="checkbox" /> </label></td> </tr> </table> </form> Quote Link to comment Share on other sites More sharing options...
jbrill Posted July 5, 2007 Author Share Posted July 5, 2007 no more ideas? Quote Link to comment Share on other sites More sharing options...
teng84 Posted July 5, 2007 Share Posted July 5, 2007 are referring to ajax thing Quote Link to comment Share on other sites More sharing options...
jbrill Posted July 5, 2007 Author Share Posted July 5, 2007 eeek is there script i can use?? never gotten into ajax before Quote Link to comment Share on other sites More sharing options...
teng84 Posted July 5, 2007 Share Posted July 5, 2007 http://www.w3schools.com/php/php_ajax_database.asp see and click the dropdown menu there and tell me its wat you need 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.