Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,
i have input, like this
HTML
<input type="text" id="inputSom" name="cEmail" />


and javascript
JavaScript
function prodAvail()
{
    return(document.getElementById('inputSom').value);

}


and href
HTML
<a id="hrefId" href="/CuAv.aspx?productID={ProductID}&customerID={/root/System/CustomerID}&variantID={VariantID}&customerMAil=????" >Go to</a>


How i can get value(customer email) from input and send it with the href? Instead of the last parameter, where is now '????'.

Thanks
Posted

Ok, i solved this problem with js. My solution:
JavaScript
<script type="text/javascript">
  function prAv()
  {
  var pID=<xsl:value-of select="ProductID" xmlns:xsl="#unknown" />;
  var vID=<xsl:value-of select="VariantID" xmlns:xsl="#unknown" />;
  var cID=<xsl:value-of select="CustomerID" xmlns:xsl="#unknown" />;
  var mail=document.getElementById('inputSom').value;

  var url="/CuAv.aspx?pID="+pID+"&cID="+cID+"&vID="+vID+"&mail="+mail;
  window.location.href =url;


  }
</script>


HTML
<a id="inputSom" href="javascript:prAv();">Go to</a>
 
Share this answer
 
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900