html form change Input value based on drop-down selected

R

RCGUA

I have an HTML Form below that has a drop-down box where the user
selects "Monthly" or "Once". I would like the value of the Input for
the description to change based on whether the user choose Once or
Monthly. Can anybody help with a javascript for this?

<html>
<body>
<form name = "DonateForm" method="post" action="mailto:[email protected]">
<select>
<option name="shopping-cart.items.item-1.subscription.period"
value="ONCE" type="text">
</option>
<option name="shopping-cart.items.item-1.subscription.period"
value="MONTHLY" type="text">
</option>

<input name="shopping-cart.items.item-1.item-description"
value="Monthly Donation" type="text">
</select>
</form>
</body>
</html>
 

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

Members online

No members online now.

Forum statistics

Threads
473,981
Messages
2,570,188
Members
46,731
Latest member
MarcyGipso

Latest Threads

Top