For Programmers: Free Programming Magazines  


Home > Archive > PERL CGI Beginners > November 2004 > cgiemail - formquestion









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author cgiemail - formquestion
Patricia Gnecco

2004-11-01, 8:55 am

I made a form that is working... Now the client wants
the form to self-update the content of the fields as
the user fills out the form. For example, if they pick
2 t-shirts in a certain field (that cost 10 each),
then in the subtotals field for t-shirts, it already
shows up the value for 2 t-shirts, $20...

Is this possible with a form in a html that submits
the info with cgiemail? Or would it better be done
with dhtml? Do you know where I can get a code that
would make this happen?

Thanks!
Patricia




__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail
Chasecreek Systemhouse

2004-11-01, 8:55 am

On Sun, 31 Oct 2004 16:30:39 -0800 (PST), patricia gnecco
<patri3@yahoo.com> wrote:
> I made a form that is working... Now the client wants
> the form to self-update the content of the fields as
> the user fills out the form. For example, if they pick
> 2 t-shirts in a certain field (that cost 10 each),
> then in the subtotals field for t-shirts, it already
> shows up the value for 2 t-shirts, $20...



I would choose DHTML or JavaScript - which are things that happen on
the client.

Otherwise you wouod have to set each field as a submit to get the
server side CGI to process it. It would take forever depending upon
the complexity of the form.

However, there are perl modules which allow you to write Client-side JS code:
http://search.cpan.org/~grichter/Em...orm/Validate.pm

Goto search.cpan.org and see what modules are available.
--
WC -Sx- Jones
http://youve-reached-the.endoftheinternet.org/
David Dorward

2004-11-01, 8:55 am

On Mon, Nov 01, 2004 at 04:59:35AM -0500, Chasecr Systemhouse wrote:

[color=darkred]
> I would choose DHTML or JavaScript - which are things that happen on
> the client.


DHTML being code for "JavaScript + DOM + HTML" ... usually.

The problem with this is that you can't know if it will work - it
depends on the client. It is also easy for the client to forge. So
while it can be used to give information to the user, it is essential
that you do not depend on any data generated from JavaScript to either
exist or be accurate.

--
David Dorward http://dorward.me.uk



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com