Link to home
Start Free TrialLog in
Avatar of willsherwood
willsherwood

asked on

HTML FORM Action - how to dynamically set the action target value

based on a dropdown selection within a form, i need to conditionally change the FORM Action target filename value.

the JS might look like:
IF (dropdownvalue='Special')  Form.Action='NewFileName';

what syntax construct do i use to get at the dropdown value and the FormAction


thanks
ASKER CERTIFIED SOLUTION
Avatar of Cem Türk
Cem Türk
Flag of Türkiye 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 willsherwood
willsherwood

ASKER

excellent, never knew you could specify it  that way, thanks!
Follow-up.
It almost works.
1. I left the "default"  <option> tags without an  action=   and that works fine.
2.  However, the action='newfile.php'    ends up yielding  the literal text "undefined"  and the URL that is chosen is the literal filename   "undefined"   (no file extension)

any thoughts?