Project Description:
Hello,
I would like a javascript script that will modify the field values of the html form pasted below. It should be able to add new fields in the form as well.
For example, it should be able to
1. Change <input type="hidden" name="x_login" value="999999"> to <input type="hidden" name="x_login" value="modified_value">
2. Introduce the following line:
Change <input type="hidden" name="new_name" value="new_value">
<form id="TwoCheckoutForm" name="TwoCheckoutForm" target="_top" action="https://www.2checkout.com/2co/buyer/purchase" method="post" onsubmit="return ( validateForm(this) && TwoCheckoutForm_Validator(this))">
<input type="hidden" name="x_login" value="999999">
<input type="hidden" name="x_amount" value="270.00">
<input type="hidden" name="x_invoice_num" value="...">
<input type="hidden" name="x_receipt_link_url" value="https://www....">
<input type="hidden" name="x_return_url" value="https://www....">
<input type="hidden" name="x_return" value="https://www....">
<input type="hidden" name="x_First_Name" value="John">
<input type="hidden" name="x_Last_Name" value="Wayne">
<input type="hidden" name="x_Address" value="xx Streeet">
<input type="hidden" name="x_City" value="New York">
<input type="hidden" name="x_State" value="--">
<input type="hidden" name="x_Zip" value="99999">
<input type="hidden" name="x_Country" value="Netherlands">
<input type="hidden" name="x_EMail" value="">
<input type="hidden" name="x_P" value="91222222">
<input type="hidden" name="city" value="Amsterdam">
<p align="center"><input type="submit" class="PaymentPageContinueCheckoutButton" value="Continue Checkout"></p></form>