•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 423,081 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,366 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 568 | Replies: 2
![]() |
•
•
Join Date: Sep 2004
Location: localhost
Posts: 19
Reputation:
Rep Power: 5
Solved Threads: 0
hi,
I have an HTML form setup. It has several input text fields to enter the data. I also want the user to add more text fields dynamically if he wishes to enter more data. If I do it directly though PHP using loops, I loose the data previously entered in the fields.
I was wondering about implementing Ajax to solve this probelm to generate multiple text fields. I am new to using Ajax technique, and I do not have solid JavaScript background, and I am kind of strugling.
Thanks very much! Any help would be greatly appreciated!
I have an HTML form setup. It has several input text fields to enter the data. I also want the user to add more text fields dynamically if he wishes to enter more data. If I do it directly though PHP using loops, I loose the data previously entered in the fields.
I was wondering about implementing Ajax to solve this probelm to generate multiple text fields. I am new to using Ajax technique, and I do not have solid JavaScript background, and I am kind of strugling.
Thanks very much! Any help would be greatly appreciated!
•
•
Join Date: Apr 2005
Location: New York state
Posts: 464
Reputation:
Rep Power: 5
Solved Threads: 72
People are throwing around the word AJAX as if it is synonymous with DHTML.
^ Not AJAX
javascript Syntax (Toggle Plain Text)
var container = document.getElementById('the_form_container'); var newfield = document.createElement('input'); newfield.type = 'text'; newfield.id = someCounter+'_suffix'; container.appendChild(newfield);
GCS d- s+:+ a-->? C++(++++) UL+++ P+>+++ L+++ !E--- W+++
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r z+*
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r z+*
•
•
Join Date: Aug 2008
Posts: 374
Reputation:
Rep Power: 1
Solved Threads: 34
You can use DHTML as mentioned above ... no problem. Or if you want to stick to the ol' familiar PHP looping you can do something like this to keep the value of your form field on page reload ...
If page reload is what you mean by loops.
<input type="text" name="test" value="<? print $_GET['test'] ?>" />
![]() |
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- how to pass one script to another using php,mysqldatabase (PHP)
- value pass from one script to another script (JavaScript / DHTML / AJAX)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Ajax and gzip
- Next Thread: Radio input value


Linear Mode