Re: php+ ajax

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/20/06, blackwater dev <blackwaterdev@xxxxxxxxx> 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@xxxxxxxxx

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux