一旦用户按下提交,我正在尝试根据下拉列表中的选择动态更改表单更改发布操作。一旦做出选择,我已经让它工作了,但这会覆盖我的验证规则。
我正在处理的网站的网址是 instaloan.glidewebdesign.com
根据“汽车标题状态”下拉列表中的选择,我希望它根据答案提交不同的发布操作。
在此先感谢您的任何帮助!!!!!!!
function set_form_action()
{
if (page == 'clear_title')
{
window.location = 'https://secure.leads360.com/Import.aspx? Provider=TMXFinance&Client=TMXFinance&CampaignId=1034&Url=http://instaloan.glidewebdesign.com/index.php/thank-you';
}
else if (page == 'lien_on_title')
{
window.location = 'https://secure.leads360.com/Import.aspx?Provider=TMXFinance&Client=TMXFinance&CampaignId=1034&Url=http://instaloan.glidewebdesign.com/index.php/thank-you2';
}
else if (page == 'no_title')
{
window.location = 'https://secure.leads360.com/Import.aspx?Provider=TMXFinance&Client=TMXFinance&CampaignId=1034&Url=http://instaloan.glidewebdesign.com/index.php/thank-you3';
}
}
<form name="homeform" >
<fieldset>
<input name="first" type="text" class="name" placeholder=" First Name" maxlength="10" onkeyup="checkInput2(this)" required="required" />
<input name="last" type="text" class="name" placeholder=" Last Name" maxlength="15" onkeyup="checkInput2(this)" required="required" /></br>
<input name="phone" type='tel' pattern='^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$' title='Phone Number (Format: (999) 999-9999)' class="name" placeholder=" Phone Number" maxlength="10" onkeyup="checkInput(this)" required="required" />
<input name="zip" type="text" name="zipCode" value=""
pattern="[0-9]{5}([-][0-9]{4})?" placeholder=" Zip Code" class="name" maxlength="5" onkeyup="checkInput(this)" required="required" /></br>
<select name="amount" class="dropdown" value="Amount Requested">
<option value="0">Amount</option>
<option value="$100-$499">$100 - $499</option>
<option value="$500-$999">$500 - $999</option>
<option value="$1000-$1999">$1,000 - $1,999</option>
<option value="$2000-$2999">$2,000 - $2,999</option>
<option value="$3000+">$3,000+</option>
</select>
</br>
<select name="status" class="dropdown" value="Car Title Status" >
<option value="smt">Car Title Status</option>
<option value="clear_title">I have a clear car title</option>
<option value="lien_on_title">There′s a lien against my car title</option>
<option value="no_title">I don′t have a car title</option>
</select>
</br>
<input name="submit" type="submit" class="submit" value="Find Out Now" />
</fieldset>
</form>