Link to home
Start Free TrialLog in
Avatar of cofcmgr
cofcmgr

asked on

3 forms to choose from based on value of variable - javascript

I will try to write out in layman's terms what i am looking for....  if variable = 1, i want to choose html form named "region_west" and send an email to a sales rep that is located in the west, if variable = 2, i want to choose html form named "region_central that will send email to central sales rep, if variable = 3, i want to choose html form named "region_east that will send email to east sales rep

i am defining the variable value correctly and have the forms developed, but need help with the if statement to select the correct form.

.
ASKER CERTIFIED SOLUTION
Avatar of nschafer
nschafer
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cofcmgr
cofcmgr

ASKER

The actual input form is the same for each region.  The diffent form for each region consists of hidden objects.  The "hidden" form for one of the regions are .......

form action="/applications/formsprocessor/default.aspx" name="region_west" method="post">
 <input type="hidden" name="to_address"   value="sample@email.com">
 <input type="hidden" name="subject"   value="Subject Line">
 <input type="hidden" name="from_address" value="DoNotReply@mail.com">      
 <input type="hidden" name="redirect"   value="/acquisition/thankyou.html">
 <input type="hidden" name="mail_server"  value="mail.mail.com">
 <input type="hidden" name="body_format"  value="text">
</form>

thanks a million!
Glad I could help,
Neal.