Hi.
I have two problems with javascript.
One it's that if i have var x = "aaaa ";
it will show "aaaa"
How do i prevent this from happening in jS?
The other problem is with a textarea
var textarea = document.getElementById("myTextArea");
var begin = "a begining<b>";
var end = "</b>some other stuff";
textarea.value = begin.substr(0,begin.length-4) + end.substr(4,end.length);
the problem is that in the textarea, when the text shows, it doesnt start from the begining of the textbox, but a space ahead.
Can you help with both problem?
Cheers.
I have two problems with javascript.
One it's that if i have var x = "aaaa ";
it will show "aaaa"
How do i prevent this from happening in jS?
The other problem is with a textarea
var textarea = document.getElementById("myTextArea");
var begin = "a begining<b>";
var end = "</b>some other stuff";
textarea.value = begin.substr(0,begin.length-4) + end.substr(4,end.length);
the problem is that in the textarea, when the text shows, it doesnt start from the begining of the textbox, but a space ahead.
Can you help with both problem?
Cheers.