Quantcast
Channel: Classic ASP
Viewing all articles
Browse latest Browse all 488

How to handle quote marks in a text input field in a form.

$
0
0

I have a form with a text input (search) field.

Here it is allowed to use double quote marks to define a combined search word.

It could look like 'good bad "1 2" nice' where '1 2' is a combined search word.

 

The problem is that after clicking the form, which takes you back to the page and begins the implementing of  the search, then the content of the field is changed to 'good bad'.

The text after the first double quote mark has now disappeared.

It is probably because the first double qoute mark is believed to be a string ending.

 

An input of 'good bad ""1 2"" nice' gives the same result. Only 'good bad' is left.

 

I of course would like the whole input string(s) to still be visible when the search is carried out.

 

I can catch the original search string as it comes back to the page. But I don't know how I could put that back into the abbreviated field.

 

Can that be done?

 

/Larry


Viewing all articles
Browse latest Browse all 488

Trending Articles