Solved

Using ajax to update an anchor tag with href and name

Posted on 2007-12-06
2
599 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
Comment Utility
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
Comment Utility
Totally awesome...thanks for the quick response....
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
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…

743 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

19 Experts available now in Live!

Get 1:1 Help Now