Ok, this should be something real easy, but i tried all kinda stuff and still cant manage to make it right..
So i want to click on a link and send the volume of it to a textarea.
See:
Onclick sending href volume to textarea?
Re: Onclick sending href volume to textarea?
...
So you want to go to that link, and have the box 'selected' ?
So you want to go to that link, and have the box 'selected' ?
Re: Onclick sending href volume to textarea?
When i hover over a comment it shows me the link in the bottom left(i managed to do that already...). And when i click on the comment it sends the link to the textarea. The screenshot shows where i want to have the link of the comment...
Re: Onclick sending href volume to textarea?
If your <a> tag has the id of "link" and the <textarea> "area" then you can do this.
[syntax=javascript]document.getElementById('link').addEventListener('click', function(event){
event.preventDefault();
// this will get you the link.
alert(this.href);
// this will add it to the textarea
document.getElementById('area').appendChild(document.createTextNode(this.href));
}, false);[/syntax]
Hopefully anyway
[syntax=javascript]document.getElementById('link').addEventListener('click', function(event){
event.preventDefault();
// this will get you the link.
alert(this.href);
// this will add it to the textarea
document.getElementById('area').appendChild(document.createTextNode(this.href));
}, false);[/syntax]
Hopefully anyway