Alexander Foken: Line feed in Textarea

Beitrag lesen

Moin Moin !

function change_textarea(language, DataID) { //sets textarea to the string recognized by the application as FAQ in the res.html file

var textarea_obj = eval('document.faq.data_'+language);

textarea_obj.innerHTML = "<H1 class="ID">Record ID "+ DataID + "</H1>\n<p align="left"><img border="0" src="images/faq_begin.gif" width="624" height="36"></p>\n<p> </p>\n<p align="right"><img border="0" src="images/faq_end.gif" width="624" height="36"&gt";

return true;
}

geht's noch?

Die normale Syntax, um Inhalte von Formularelementen zu ändern, ist diese:

documment.forms['HIER_DER_NAME_DES_FORMS'].elements['HIER_DER_NAME_DES_ELEMENTS'].value="hello\nworld";

Alexander

--
Nein, ich beantworte keine Fragen per eMail. Dafür ist das Forum da.
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so!"