User Profile

Collapse

Profile Sidebar

Collapse
cyuno
cyuno
Last Activity: Nov 29 '10, 09:02 PM
Joined: Aug 17 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • How to get line break and carriage return in text box to work on IE?

    I am having problems in IE with the following text box javascript code. In Firefox the line breaks and carriage returns work perfectly but not in IE:

    Here is the javascript:
    Code:
    	function repp(){
    				var ss = document.getElementById('description').value;
    				ss = ss.replace(/(\r\n)|(\n)/g,"<br/>");
    				document.getElementbyId('description').value = ss;
    			}
    ...
    See more | Go to post

  • cyuno
    replied to javascript problem
    Yes. I have a div which is separate from the textarea box which reflects what is being typed in the textarea box. In Firefox, the div exactly captures what is in the textarea box including CRs. This is not the case with IE.
    See more | Go to post

    Leave a comment:


  • cyuno
    replied to javascript problem
    javascript problem

    I made the change but IE still refuses to recognize hitting enter for carriage return in the textarea. Also hitting alt enter gives me a full screen view without the browser (I'm on windows xp)

    Thanks for the quick response!

    Regards,
    cyuno
    See more | Go to post

    Leave a comment:


  • cyuno
    started a topic javascript problem

    javascript problem

    The following code works in a textarea box Firefox but not IE8:

    Code:
    <script language="javascript">
    function repp()
    {
    var ss = document.getElementById('text').value;
    ss = ss.replace(/(\r\n)|(\n)/g,"<br />");
    document.getElementById('text').value = ss;
    }
    </script>
    In IE, when you hit enter, there are no carriage returns...
    See more | Go to post
No activity results to display
Show More
Working...