Need to set a field on the onclick event using javascript

Hi,

I need to set a field computed for display on a form when the user clicks the next button.

I know that I have to use javascript for that and I don’t know javascript, can anyone help me with this code…

I need to have the computed for display field to be set to value + 1

thanks

A.

Subject: Need to set a field on the onclick event using javascript…

yes , that is done, yet I am missing something

Subject: RE: Need to set a field on the onclick event using javascript…

Try re-creating the buttons on the form in another location, or even on a test form with nothing else on it and make sure you have no hide/whens for your test and that the button is not set as html. Highlight it and check the text menu. I get this sometimes when I’m moving things from one line up to another by deleting the carriage return. I find that I have to highlight the object and turn off the checkmark on that menu option again.

Subject: Need to set a field on the onclick event using javascript…

Hi, try this, add this javascript code in your next button (onClick event):

window.document.forms[0].YourFieldName.value = window.document.forms[0].YourFieldName.value + 1;

hope this help.

Subject: RE: Need to set a field on the onclick event using javascript…

what happens is that the next button does not show up and the previous button acts as a submit button… how can I have the button Previous and Next act as they should?

thanks

Subject: RE: Need to set a field on the onclick event using javascript…

In your database properties on the first tab, make sure use javascript when generating pages is checked. You may need to also use generate HTML for all fields on the second tab of the form properties.