FP 2002 - submit button add an onclick event handler

P

penelope

First of all, thanks to Stefan for his help.

In a previous posting I got this instruction:

___
In the submit button add an onclick event handler
onclick="this.form.total.value = this.form.field1.value
+ this.form.field2.value;return true;"
___

the problem is that I do not know how to add an on click
event handler. I right click on the cubmit button on the
form but it does not say anything about event handlers.

I appreciate your help.

Penelope
 
P

penelope

I am attqaching my initial e-mail and the initial
response where it says here. Let me know if you can help.

Thanks in advance,
Penelope

STARTS HERE___________
Create a hidden form field for the total and add that
field to your confirmation page
In the form, right click | Form Properties | Advanced |
Add | Name the field (say total) and give it a value (say
0).

In the submit button add an onclick event handler
onclick="this.form.total.value = this.form.field1.value
+ this.form.field2.value;return true;"

where field1 and field2 are the 2 field names of the
fields you want to total

PS use validation to make sure Fields 1 & 2 are required
fields



message | I need help with the following task:
|
| I have a page where there is a form. Two field in that
| form require that you input a number. Once you click
| submit, all the data in the form, gets sent to a
| database. You then get a customized confirmation page
| where you see the data that you have entered in the
| database.
|
| Also, I need to display a total, which is the sum of the
| two number entered in the form and into the database.
|
| Any ideas?
|
| Thanks,
|
| Regards

ENDS HERE_____________
 
S

Stefan B Rusynko

Paste the onclick text into Notepad, and then from Notepad into HTML View inside of the submit button (select the Submit button and
switch top HTml View) so it will look something like:

<input type="submit" value="Submit" name="Submit" onclick="this.form.total.value = this.form.field1.value +
this.form.field2.value;return true;">




| First of all, thanks to Stefan for his help.
|
| In a previous posting I got this instruction:
|
| ___
| In the submit button add an onclick event handler
| onclick="this.form.total.value = this.form.field1.value
| + this.form.field2.value;return true;"
| ___
|
| the problem is that I do not know how to add an on click
| event handler. I right click on the cubmit button on the
| form but it does not say anything about event handlers.
|
| I appreciate your help.
|
| Penelope
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top