Click to See Complete Forum and Search --> : Quotation marks in TextBox


Josh81
04-14-2003, 04:21 PM
Beginner developer here. I want to place the following inside a textbox:

She said "Hello"

So I did the following

<input type=textbox name='name_char' maxlength='100' size='104' value="She said "hello"" tabindex='9'>

However, due to the quotation marks only

She said

was displayed. Is there a way to get around this?? I was thinking of using textarea:

<textarea name='name_char' rows='1' MaxLength='100' cols='78' tabindex='9'> She said "hello" </textarea>

But textarea has the stupid scroll bar. But I don't need it since there is only on line.

Can someone help me out? Thank you very much

nkaisare
04-14-2003, 04:29 PM
Originally posted by Josh81
<input type=textbox name='name_char' maxlength='100' size='104' value="She said "hello"" tabindex='9'>
Try:
<input type=textbox name='name_char' maxlength='100' size='104' value='She said "hello"' tabindex='9'>

Josh81
04-14-2003, 04:53 PM
<input type=textbox name='name_char' maxlength='100' size='104' value='She said "hello"' tabindex='9'>

Thank you nkaisare. But now text with single quotes in them will not work. I should of indicated this earlier - the text itself is a variable. So, for example, if the text is

She said 'hello'

only She said would br printed. Is there a way to solve both single quote and double quote problem?

Thank you