Re: php+ ajax
| From: | Kim Christensen | Date: | Mon, 20 Feb 2006 21:25:41 +0000 |
| Subject: | Re: php+ ajax | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-230766@lists.php.net to get a copy of this message | ||
On 2/20/06, blackwater dev <blackwaterdev@gmail.com> wrote:
> The problem is js seems to get confused trying to look this up by id
> and I don't think I can use an array like this with a GET, how can I
> use arrays for all this??
You have to escape the brackets with backslashes, so that the JS
really interprets it as an element ID - not an array. Something like
this might work:
[snip]
(HTML)
<input name="search[min_price]" id="search[min_price]">
(JS)
var min_price= document.getElementById('search\[min_price\]').value ;
[/snip]
--
Kim Christensen
kim.christensen@gmail.com