[Proto-Scripty] Re: textarea and linebreaks
Thanks a lot - it helps me! On 16 окт, 06:01, RobG [EMAIL PROTECTED] wrote: On Oct 16, 4:42 am, buda [EMAIL PROTECTED] wrote: I'm sorry - maybe its not sutable forum but I dont take part in anyone except this one I have a textarea with wrap=hard Wrap is not a standard attribute (i.e. it isn't part of the HTML 4.01 standard), it can't be expected to be consistent across browsers (and it isn't). The best place to discuss that is: news: comp.infosystems.www.authoring.html URL:http://groups.google.com/group/comp.infosystems.www.authoring.html it works as I expected I guess you mean according to the MSDN article: URL:http://msdn.microsoft.com/en-us/library/ms535152(VS.85).aspx It would be good if you provided an explanation or link so that others know what you expected. but when i tryed to set textarea.innerHTML = textFromServer it doesnt wraps text onto lines The content of a textarea element is plain text, setting its innerHTML property to change its value is not appropriate, use the value property directly: textarea.value = textFromServer; therefor linebreaks are present in textFromServer That doesn't make sense - you say it doesn't wrap, therefore there are linebreaks? How are the line breaks included in the textFromServer? As \r or \n or similar? what should I do? Take the line breaks out at the server before sending the text, or strip them before assigning to textarea.value. Do not set the wrap attribute to anything (don't use it at all), use CSS to define the width of the textarea and also set the cols attribute so the text will wrap using the browser's rules (in standards compliant browsers). But discuss it in comp.infosystems.www.authoring.html- some there are a bit surly but it's where you'll find the experts and you will get good advice. -- Rob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: textarea and linebreaks
Thanks, that was I remember that thomsing special with textarea and so tried to set innerHTML instead of standart of .value On 16 окт, 06:37, lfortin [EMAIL PROTECTED] wrote: Hi buda, Try to set the attribute value instead of innerHTML like this: textarea.value = textFromServer; or $(textarea).writeAttribute(value, textFromServer); On Oct 15, 2:42 pm, buda [EMAIL PROTECTED] wrote: I'm sorry - maybe its not sutable forum but I dont take part in anyone except this one I have a textarea with wrap=hard it works as I expected but when i tryed to set textarea.innerHTML = textFromServer it doesnt wraps text onto lines therefor linebreaks are present in textFromServer what should I do?- Скрыть цитируемый текст - - Показать цитируемый текст - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: textarea and linebreaks
On Oct 16, 4:42 am, buda [EMAIL PROTECTED] wrote: I'm sorry - maybe its not sutable forum but I dont take part in anyone except this one I have a textarea with wrap=hard Wrap is not a standard attribute (i.e. it isn't part of the HTML 4.01 standard), it can't be expected to be consistent across browsers (and it isn't). The best place to discuss that is: news: comp.infosystems.www.authoring.html URL: http://groups.google.com/group/comp.infosystems.www.authoring.html it works as I expected I guess you mean according to the MSDN article: URL: http://msdn.microsoft.com/en-us/library/ms535152(VS.85).aspx It would be good if you provided an explanation or link so that others know what you expected. but when i tryed to set textarea.innerHTML = textFromServer it doesnt wraps text onto lines The content of a textarea element is plain text, setting its innerHTML property to change its value is not appropriate, use the value property directly: textarea.value = textFromServer; therefor linebreaks are present in textFromServer That doesn't make sense - you say it doesn't wrap, therefore there are linebreaks? How are the line breaks included in the textFromServer? As \r or \n or similar? what should I do? Take the line breaks out at the server before sending the text, or strip them before assigning to textarea.value. Do not set the wrap attribute to anything (don't use it at all), use CSS to define the width of the textarea and also set the cols attribute so the text will wrap using the browser's rules (in standards compliant browsers). But discuss it in comp.infosystems.www.authoring.html - some there are a bit surly but it's where you'll find the experts and you will get good advice. -- Rob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---