Populate form field based on other entries

C

C O'Connors

On a Frontpage form that is posting data to an Access
database I wish to populate a field based on entries made
to other fields. Example: Field 1 = Georgia and Field 2
= BA. If Field 1 = Geogia and Field 2 = BA Then Field 3
= "Job Candidate". I know this is simple, but I'm just
not getting it. Thanks in advance for the help.
 
M

MD WebsUnlimited.com

Hi C,

The code would be tied to the onclick event of the submit button

<input type="submit" onclick="if (this.form.field1.value == 'Georgia' &&
this.formfield2.value == 'BA' ) { this.form.field3.value = 'Job Canididate';
return true; } else { return false; } " >
 
C

C. O'Connors

Mike,

Thanks for the quick response to my questions. Below is
the actual code I've used in a click event per your
suggestion. No errors, but nothing is going to the
database. Am I missing something. Thanks again.

C. O'Connors

<input type="submit" onclick="if (this.form.CLASS.value
== 'Computer Equipment' &&
this.form.ADDRESS.value == '4915 Jackson Court,
Atlanta, GA 32002') (this.form.GL_ASSETT_ACCT_NO.value
= '1670-200';
return true; } else { return false; } " >

'Field1 = CLASS
'Field2 = ADDRESS
'Field3 = GL_ASSETT_ACCT_NO
 
M

MD WebsUnlimited.com

Hi C,

May I see the page on the net?

The only thing I see wrong here is that you used a paren instead of a
bracket

32002') (this.form.GL_ASSETT s/b 32002') {this.form.GL_ASSETT
 

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