Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    May 2008
    Posts
    17
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Exclamation Internet Explorer Newline Issues

    I am building an application that uses jQuery to save the content of a textarea1. So, when you click the save link, it grabs the value of the textarea1 and puts it into another textarea2 from which you can copy the code to a .txt file on your computer. When you want to return your saved copy back to the textarea1 you copy from the .txt file into another textarea3 and click insert content. The jquery then parses out your input and reenters it into the textarea1.

    My problem is this: Internet Explorer does not maintain the newlines but puts all the content onto one line when reentering the content. I need it to maintain the newlines just like Firefox and Chrome do.

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    So this is a <textarea> you are using the collect the data? What happens if you just type a few lines by hand in a text editor, copy and paste it into the textarea? Isn't that essentially what you're doing? That works fine for me (ie7).

  • #3
    New Coder
    Join Date
    May 2008
    Posts
    17
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I'll be getting the app online in a couple days which has this problem. Once I do, I think you will understand what I'm saying.

  • #4
    New Coder
    Join Date
    May 2008
    Posts
    17
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Exclamation

    Okay,

    I've got the app online so that it can be tested and get this issue rolled out.

    http://madlibmachine.com/

    First, tinker around with the app in firefox or any modern day browser and get a feel for how the save function works.

    Then go and test the save function in IE of any version. You'll notice that it's not interpreting newline characters correctly and thus messes up the output immensely.

    Once you understand the problem, any help or ideas on how to fix it are quite appreciated. I believe it has something to do with .html() filtering out newlines in IE.

    Thanks in advance.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •