Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #5817
| From | "M. Strobel" <sorry_no_mail_here@nowhere.dee> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: Data entry forms |
| Date | 2012-05-04 09:38 +0200 |
| Message-ID | <a0hfbpFgjhU1@mid.uni-berlin.de> (permalink) |
| References | <16041.28.1336084372301.JavaMail.geo-discussion-forums@ynf8> |
Am 04.05.2012 00:32, schrieb Charles: > I'm working on a data entry for for this application, and I'm stuck at what may end up being some bad code. I'm capturing data for two tables (custinfo and orderinfo) on one page. The top part of the data entry form collects data once for the transaction, kind of like an invoice captures customer details. The bottom part (the part I'm stuck on) captures order information line after line. > > So, for example: > > TopForm (custinfo) > Customer name > Customer address > Customer city, state, zip > > Bottom form (orderinfo) > Item description > Item quantity > Item price > > What I'm looking for is two things: > > 1) The ability to extend the bottom form item by item as the order grows. > > 2) The ability to remove items (last in, first out) if the order needs to shrink. > > I can already clear the form, cancel data entry, and submit data for processing; I need to know how to dynamically enlarge or shrink the second half of the form. > > Can this be done in PHP? Short answer: can be done in PHP + Ajax. It works like this: Server (PHP script) sends html + (embedded or linked) javascript User enters data onchange() event + your javascript in client browser sends data to server (in background) Server (PHP script) must handle it, and send Ajax response to browser Browser executes sent javascript, which may add or remove document elements /Str.
Back to comp.lang.php | Previous | Next — Previous in thread | Find similar | Unroll thread
Data entry forms Charles <cchamb2@gmail.com> - 2012-05-03 15:32 -0700 Re: Data entry forms Jerry Stuckle <jstucklex@attglobal.net> - 2012-05-03 19:33 -0400 Re: Data entry forms "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-05-04 09:38 +0200
csiph-web