from the below code how do I pass the contents of the ‘username’ field to the end of the URL:
https://carrierconnect.etdatacenter.com/Default.aspx?accesstype=autologin&cust=id_015&user=username
where I currently have username
Basically the form works where I fill in the username and password then based on whether the user selects ‘customer tracking’ or ‘web booking’ goes to the specific URL
<script type=“text/javascript”>
function OnSubmitForm()
{
if(document.myform.operation[0].checked == true)
{
document.myform.action ="https://webtrace.etdatacenter.com/webtrace.aspx?accesstype=autologin&cust=id_015&user=templateuser";
}
else
if(document.myform.operation[1].checked == true)
{
document.myform.action ="https://carrierconnect.etdatacenter.com/Default.aspx?accesstype=autologin&cust=id_015&user=username";
}
return true;
}
</script>
<form name=“myform” target=“_blank” method=“post” action=“” onsubmit=“return OnSubmitForm();”>
<fieldset>
<legend><font color=“#FFFFFF”>LOGIN</font></legend>
username: <input type=“text” name=“username”/><br /><br />
password: <input type=“password” name=“password”/><br />
<input type=“radio” name=“operation” value=“1” checked=“checked”/><font size=“-1”>Customer Tracking</font>
<input type=“radio” name=“operation” value=“2” /><font size=“-1”>Web Booking </font>
<input type=“submit” name=“submit” value=“submit” />
</fieldset>
</form>