Solved

Using ajax to update an anchor tag with href and name

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
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…

713 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