Hi. Please consider the following HTML:
<input type='text' id='name'/>
<option id='option'>
<select value='1'>hi</select>
<select value='2'>bye</select>
</option>
<input type='text' id='date'/>
This is a very simple form used to get search criteria from a user. I need to submit this search criteria to the server with an AJAX call. What is the best data type/structure to use to do this? And why?
I'm currently thinking a string vs. JSON object. So, I'll either pass
"John|2|2010-10-10"
to the server or I'll pass
{"name":"John","option":2,"date":"2010-10-10"}
Maybe there is some other creative way to deal with search criteria? This criteria is being shot to the server only one time, it doesn't come back to js.
Thanks.