Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Using ajax to update an anchor tag with href and name

Posted on 2007-12-06
2
Medium Priority
?
611 Views
Last Modified: 2010-05-18
Hi,

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 is....how do I do that?  Please show code....

Thanks,

David


0
Comment
Question by:dmontgom
2 Comments
 
LVL 12

Accepted Solution

by:
Sinoj Sebastian earned 2000 total points
ID: 20425801
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

0
 

Author Closing Comment

by:dmontgom
ID: 31413350
Totally awesome...thanks for the quick response....
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question