I need to transfer up to some 15 items of data from PHP into JavaScript. I've normally done this by creating hidden inputs with PHP and then using 'getElementById' to extract the value. But it's getting a bit cumbersome, with loops to create the inputs, and more loops to extract. It works, but I wonder if there's a better way ?
I have the information available as a GET string. There are (three) sub-arrays in the GET, and the number of values which may be present in each sub-array varies from 0-9. The GET array keys are strings, but the sub-array keys are numeric.
Here's a typical GET string:The GET is derived from check-boxes on a search filter form, and the purpose of all this is to transfer the checks from one page to the next (which has the the search results) so that the filter form can be re-presented.Code:?ac[1]=HO&ac[2]=GH&ac[3]=BB&loc[1]=NW&loc[5]=TB&fac[1]=WiFi&fac[8]=card&accn=Search
Any suggestions, please ?






Bookmarks