Solved

Using ajax to update an anchor tag with href and name

Posted on 2007-12-06
2
600 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 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
This article discusses how to create an extensible mechanism for linked drop downs.
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…

930 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now