...

View Full Version : how to retain quotes in the value after submitting the page



javascriptuser
02-07-2007, 10:29 PM
I have a text box if a user enters a phrase he enters it within single(') or double quotes(").
If the properties for test box are like this
<input name="test" id="test" value = "<%=queryText"%>"> then
the text box value is blank after submitting the form and when sourcecode is checked the value is ""testing"".
if modified to <input name="test" id="test" value = <%=queryText"%>>
then the value is shown after submitting the form as testing without quotes

The page is JSP search page.After submitting the page appears with all the results since it is a search page
How can I retain the value as it is when the value is entered in quotes.

Thanks

Philip M
02-08-2007, 07:38 AM
Would it not be simpler if the user entered the search term without any quotes, and then these were added before submission.

e.g.

testStuff = '"' + testStuff + '"';



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum