• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

textbox taking only one word

 
Ankit Chandrawat
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In the following code I have provided a default text message in a textbox using a key the value for which is defined in a properties file, I want to give the default text as Enter Search keyword here. But inside the text box only Enter appears. I have noticed that it takes only one word/first word. Please guide me in resolving this issue.


TIA,
Ankit Chandrawat
 
Deepakkumar Devarajan
Ranch Hand
Posts: 54
Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please check whether the value of the key is enclosed in double quotes in properties file and Let us know...



 
Ankit Chandrawat
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried putting double quotes around the value of the key and it worked. Thanks. Please explain what is the basic fundamental behind putting double quotes.

TIA
 
Deepakkumar Devarajan
Ranch Hand
Posts: 54
Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ankit Chandrawat wrote:I tried putting double quotes around the value of the key and it worked. Thanks. Please explain what is the basic fundamental behind putting double quotes.


If you don't enclose the value(Which has more than one word) of a component in double quotes, the browser consider the second word as an html attribute. I hope you understand, let me know if you don't
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65342
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sloppy HTML frequently results in problems. Always quote all element attribute values.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic