Paste link feed
I have a feed which consist out of links. When I click on a link obviously it will take me to the href of that link.But instead of doing that I want to make the link(the words actualy) to be placed inside a text box (form). They must do this on click.
<input type="text" readonly="readonly" value="http://www.google.com" onclick="location.href=this.value">
Apparently I wasn't clear. The (feed) links are outside the text box. They are generated by feedburner like this:
The feed is in fact a list of links('popular searches by google'). Clicking a link will take you to the href. Instead of this default behouver I want the link to appear(/onClick) as words(plain html/text) in a text box. Hope I made my self clear this time.
What if I target all links on the html page with js and then give a function to place the links as plain text in a text box by onclick method. My only question: How do I do that?
If you want more than one link in a text field or textarea field, there is not any way that I can think of that will allow you to click ONE of those URLs and go to that URL. If you want the ability to click just one of several links, do not put them all into the same element; put each one in its own element and set the onclick parameter to go to that link.
OR put them all into a WYSIWYG editor, disable the ability to change the content, and parse HTML. That might work.
I seriously don't understand what you are talking about.
Whatever it is, it has nothing to do with my problem.
Nor do we understand what you are talking about. Will you be so kind and explain in plain words what is your problem?
Originally Posted by yomoore
I have a feed wich is generated by feedburner. It looks like this:
Originally Posted by Kor
If you copy/paste this in the body section you wil see a list of popular searches provided by google. These popular searches are also href's , so the feed looks like this in my browser:
popular search 1
popular search 2
popular search 3
popular search 4
So when clicking on a link this action wil take you to the href of that link wich is a google website. Instead of this default behouver I would like that these popular searches to be placed inside a text box when they are clicked.
So this wil happen:
1.Empty text box
2.click on popular search 3 (or whatever)
3. Popular search 3 will be placed in the text box (the inner html NOT the href)
4. Text box is now showing the text ''Popular search 3''
I realy hope somebody would give me a clue about this. I can make the links dead but than they are not clickeble anymore.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
var allA=document.getElementById('mylinks').getElementsByTagName('a'), a, i=0;
<input type="text" name="txt" id="txtid">
Yes @Kor, like that. Exept I need the innerhtml to be fild in. I need the bold letters inside the text box, not the href:
I search the internet but can't find anything since this is a unique situation.
Last edited by yomoore; 02-11-2011 at 06:51 AM.
Originally Posted by yomoore
From now on I will reject my religion and worship the greatness that is Kor.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)