Skip to main content
April 22, 2006
Question

Calculations with JavaScript

  • April 22, 2006
  • 2 replies
  • 320 views
I am really new to this. I have used the tutorial with Dreamweaver to create a table based page. It is a registration form that has fields in the table that will need to be calculated. (# of registrations time $425.00 I have the JavaScript that will do that. Do I embed that in the fields by using an OnChange behavior? I can't find anything in the Help text telling me how to do this.
This topic has been closed for replies.

2 replies

Participating Frequently
April 23, 2006
If you written the Javascript already, you could create a Javascript function in your web page with that code. It's easiest to do this in Code View. Then, you can use the Call Javascript Behavior to run the function on the OnChange event for the field.
Inspiring
April 23, 2006
Its not a good idea to do money calculations on the client because it can be
scammed so easily. Pass the form data to the server and calculate there.

<%= Clinton Gallagher

"Flier46" <webforumsuser@macromedia.com> wrote in message
news:e2dt46$hsr$1@forums.macromedia.com...
>I am really new to this. I have used the tutorial with Dreamweaver to
>create a
> table based page. It is a registration form that has fields in the table
> that
> will need to be calculated. (# of registrations time $425.00 I have the
> JavaScript that will do that. Do I embed that in the fields by using an
> OnChange behavior? I can't find anything in the Help text telling me how
> to do
> this.
>