4 Replies Latest reply on Aug 30, 2007 5:07 AM by Dooza (Steve)

    Insert text into textfield when link clicked

    Dooza (Steve)
      Hello again,
      Back with another Javascript query that I need some advice on. I am sure what I have done should work, so here goes.

      Trying to insert a variable that is made up of several fields from a recordset. I have tested that the variable does hold the right data.

      The link to make it happen:

      <a href="#" onClick="UseInvoice(<%=BillingAddress %>);">Use Invoice Address</a>

      The Javascript to make it happen:

      function UseInvoice(NewAddress) {
      document.form.BillingAddress.value = NewAddress;
      return false;

      I don't know Javascript so am just adapting what I have found online, so any advice would be great.