By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,568 Members | 1,194 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,568 IT Pros & Developers. It's quick & easy.

how to add more fields and display database records in same page

P: 2
hello guys..
i am new with javascripting and really lack of knowledge about it..
my lecturer asking me to insert or add the value that i already enter in the filed into a table locate really below the field in the same page..to get u guys clear about my problem i give a situation..example when someone want to enter more than one group member in the form but the form only provide one field to insert the group member..they have to click the button [ADD] then it will display whatever user enter inside the field into a table and let the field empty back so that they can enter another group member.
help me to get and idea to solve this problem!!!!i really appreciate it!!!
Sep 19 '06 #1
Share this Question
Share on Google+
3 Replies


P: 2
hello frens..
my default form is
<input type=textbox name=objective><input type="button" name="add" value="ADD">
when the user press the button ADD,whatever insert in the field will be appear in the table exactly below the field in the same page.
what i'm doing is insert the value in the field into a table in the database and call back the value by "select * from XXX"..my problem is the result appear at other new page.how should i code to make the result display at the same page..
add how should i clear the field after press button ADD.
Sep 21 '06 #2

ronverdonk
Expert 2.5K+
P: 4,258
To get a better understanding of what you exactly have done so far (and still want to do), please show your code (AND PLEASE DO IT WITHIN PHP or CODE TAGS!!). That way we can see (hopefully) , what can be done.

Ronald :cool:
Sep 21 '06 #3

P: 16
you have a few options:

1) AJAX!!! this is your best option, it will dynamically reload the section of the script you want updated and nothing more. if you are clueless on it, hit up google or get friendly with prototype.js.

2) <object> tags. this is if you are using strict dtds, i HIGHLY doubt you are...

3) iframes - an early form of ajax. works like framesets, but embeded in a non frameset. it will reload the iframe and nothing more. not as handy-dandy as ajax however.

all these will do is make a server call to the php file that does the mysql calls and return the information you need and put it where you want it

good luck,
-tim
Sep 22 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.