Hi all,
i've searched this forum before posting but didn't find a "clean" solution to my problem.
I have an image with a link on it:
which adds the value in a textarea in the same page via this function:
I need to disable the link after the image has been clicked,preventing multiple insertions of the same value.
I've modified the link this way:
but while only one click is allowed,i get many JS errors in the JSConsole like
and i think this is not a good sign.
Is there a way to get the same result in a cleaner way?
Thanks in advance.
i've searched this forum before posting but didn't find a "clean" solution to my problem.
I have an image with a link on it:
Code:
<a href="#null" onClick="addValue('bold');"><img src="images/myimage.gif" title="Some text" alt="Some text" /></a>
Code:
function addValue( val ) {
var tb = document.forms['valuesform'].elements['valuesfield'];
if ( tb.value.length > 0 ) tb.value += " , ";
tb.value += val;
}
I've modified the link this way:
Code:
<a href="#null" onClick="addValue('bold'); this.onclick=null;" ><img ......
Code:
uncaught exception etc....
Is there a way to get the same result in a cleaner way?
Thanks in advance.