Quotation marks in TextBox

admin

Administrator
Staff member
Beginner developer here. I want to place the following inside a textbox:<br />
<br />
She said "Hello"<br />
<br />
So I did the following<br />
<br />
<input type=textbox name='name_char' maxlength='100' size='104' value="She said "hello"" tabindex='9'><br />
<br />
However, due to the quotation marks only <br />
<br />
She said<br />
<br />
was displayed. Is there a way to get around this?? I was thinking of using textarea:<br />
<br />
<textarea name='name_char' rows='1' MaxLength='100' cols='78' tabindex='9'> She said "hello" </textarea><br />
<br />
But textarea has the stupid scroll bar. But I don't need it since there is only on line.<br />
<br />
Can someone help me out? Thank you very much<!--content-->Originally posted by Josh81 <br />
<input type=textbox name='name_char' maxlength='100' size='104' value="She said "hello"" tabindex='9'> <br />
Try: <br />
<input type=textbox name='name_char' maxlength='100' size='104' value='She said "hello"' tabindex='9'><!--content--><input type=textbox name='name_char' maxlength='100' size='104' value='She said "hello"' tabindex='9'><br />
<br />
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<br />
<br />
She said 'hello'<br />
<br />
only She said would br printed. Is there a way to solve both single quote and double quote problem?<br />
<br />
Thank you<!--content-->
 
Back
Top