Results 1 to 4 of 4

Thread: text box

  1. #1
    Join Date
    Nov 2002

    Red face text box

    i've spent days searching on the web for this w/ no luck.
    is there any way to take text from a form's text box and KEEP the whitespace? everything i see tells me how to remove it and that doesn't help at all. i want to keep the paragraphs structure EXACTLY as the user inputted.

  2. #2
    Join Date
    Nov 2002
    I don't know where you're displaying the text after you take it from the box, but if you are returning it back into HTMl for them, you could have the users use HTML tags. Otherwise, formatting won't work, to my knowledge. From what I have come to understand, whitespace is killed in HTML and jscript, but I could have heard wrong. It may be possible, however, to take the text they input and return it to the user encased in a <pre> tag, which *might* save the formatting they used. That would be something like...

    Hope that helps... :/

  3. #3
    Join Date
    Nov 2002
    i'm using aol cgi right now. i didn't know if i could generate a jscript text box or even ne other type of language to keep the formatting of the post when it was put on the message board (output) page...

  4. #4
    Join Date
    Nov 2002
    i know some c++, but i don't know BUTT about javascript, so if i use the wrong terminology, spare me.

    is there ne way to input each line into a string array one line at a time, then output each line one line at a time as well, so that i could put a manual <br> tag in between each part of the array while outputting?

    something like (in c++):

    int n=? // number of lines inputted
    string str[n]; // string array

    for (int j=0, j>=n, j++)
    cout << string[j] << endl;

    whereas "endl" in this case would be some sort of <br> in javascript.

    i just noticed this after previewing my post...
    i want my text box to work just like this one!
    the formatting stays!
    i can't decipher the javascript in the source code for this page tho, so some1 please help me out!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Recent Articles