• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Text field with #

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a jsp form with a textarea field that the user can enter comments and notes into and save to a database, this all works fine. Except when a user, somewhere in their text uses a #. The form does what it is supposed to until the user clicks on the edit or delete button the text field then displays only what is to the left of the # and everything else is blank. The URL displays the text exactly as is in the database and includes the pound sign. Am I missing something here? Is there something going on with # that I am not aware of?
Thanks!
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The pound sign in a url normally means to goto a link on the page.

You most likely need to encode the information.

Eric
 
m brymer
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
so, even though the text field appears in its entirety in the url, I still need to encode it to read it into the text field on the edit form?
 
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
# needs to be replaced by its ascii equivalent %23 while sending it over the url.
 
reply
    Bookmark Topic Watch Topic
  • New Topic