You can merge those two functions together into one rather easily:

function changeMapl (val) {
    // since you pass 'this.value' in the function call, you can get rid of 
those doc.getElement calls
    var searchString = val.replace(/'/g, "\\'");
    layerl0.setOptions({
        query: {
            select: "'geometry'",
            from: 3550449,
            where: "'STwardname' = '" + searchString + "'"
        }
    });
    
    layerl1.setOptions({
        query: {
            select: "'Postcode'",
            from: 3560603,
            where: "'Ward' = '" + searchString + "'"
        }
    });
}​ 

On Thursday, April 19, 2012 7:54:07 AM UTC-4, Daniel Bentley wrote:
>
> Hi all,
>
> I've created this page here from two different table sources
>
> http://openpreston.appspot.com/counciltest.html
> source: http://pastebin.com/uqWX3VyW
>
> And as you can see, the values queried from both tables are the same 
> "Ashton, Brookfield..."
>
> Is there a way to use one select box to show results for "Ashton" from 
> both tables rather than change the values in each box?
>
> Many thanks.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-visualization-api/-/eMcYqoVTM9UJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.

Reply via email to