0

I would like to know

i am currentlydeveloping a program and i need my users to be able to press the (+) to add a new record to the table, or alternitivly if it is the last record in the table and the user presses the down arrow key it should add a new row.

2
  • Can you show us some code? What have you tried so far? Commented Aug 17, 2012 at 6:16
  • 3
    By "record", do you mean a tr element in an html table, or a record in a database table? Please show what you have so far and explain where you're getting stuck - don't just state your requirements and expect people to implement the whole thing from scratch. Meanwhile a hint: you probably want to handle the keyup event. And if "(+)" means the actual key (as compared to some button on-screen), what if they want to enter a "+" character? Commented Aug 17, 2012 at 6:21

2 Answers 2

1

If you want to add html you can use jquery,to add a row in the table at last position use this

$('#Table tr:last').after('<tr><td></td></tr>');
Sign up to request clarification or add additional context in comments.

Comments

0

First You should add a Addnew button or row, Then write this code to onclick

$("#hidden_add_form").show();

To post the form using jquery

$("#hidden_add_form").submit(function(){
    $.post("save.php",$("#hidden_add_form").serialize(),function(){
          alert('saved');
     })
}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.