This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
Yes , i tried with NEW YORK SUMMARY with 2 spaces , it replaces multiple spaces with one space.
Issue #1: Why would your validations depend upon the display text of a select option? That's pretty fragile. I'd revisit this design.
the populated dropdown , comes directly from database columns. so NEW YORK SUMMARY (with 2 spaces) comes directly from tables and I am checking my displayed value against the table value. If displayed value's space is preserved , It makes the validation straight forward.
Perhaps you could try character entitites?
I don't know what kind of values I might recieve, so I can't use &npbsp
When the browser renders the page it basically does a trim() method to wipe out all the extra crap in it unless it is in a pre.
To preserver the whitespace is a select you need to change the spaces over to its approproate entities. So that means you are going to have to do a replace method of the data returned from your database before it is displayed.
Joined: Dec 12, 2006
Hi again, My last post had two   between NEW and YORK... But they were rendered as html... which it was Sorry if it wasn't clear Pablo