Using ajax to update an anchor tag with href and name


I know how to use ajax to update from one text box to another using the onkeyup event.

I would like to update an anchor tag in the form of <a href="ajax_href">ajax_text/>

There will be two text boxes, one to type the href= and the other to type the text for the href label.

So my question do I do that?  Please show code....



Who is Participating?
Sinoj SebastianConnect With a Mentor CTO & OpenERP Project managerCommented:
you  mean Like this?

  <a id="link" href="link">the link</a>
  <input type="text" name="name" value="value" onkeyup="document.getElementById('link').href=this.value;" />
  <input type="text" name="name" value="value" onkeyup="document.getElementById('link').innerHTML=this.value"/>

Open in new window

dmontgomAuthor Commented:
Totally awesome...thanks for the quick response....
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.