I would do the following:
Code:
... <option value='10-20'>$10 thru $20</option> ...
Then in the handling code (I'm assuming it will be PHP, and assuming the select field's name is price in this example):
PHP Code:
...
$price = $_GET['price'];
$price = explode("-", $price);
$min_price = $price[0];
$max_price = $price[1];
...
OR in js:
Add 2 hidden fields into the form, one named "min_price", the other named "max_price", and an onchange referece in the select name
Don't forget to fill in the values for min_price and max_price (set the values to that of the first option in the select field), this could also be achieved through js with some more effort.
Code:
<select name='price' onchange="this.form.min_price = this.value.split('-')[0]; this.form.max_price = this.value.split('-')[1];">
<option value='10-20'>$10 through $20</option>
<option value='21-30'>$21 through $30</option>
</select>
<input type='hidden' name='min_price' value='10' />
<input type='hidden' name='max_price' value='20' />
Hope that helped.
Bookmarks