Select more categories with 1 click - Simple problem?

44 views
Skip to first unread message

Kok

unread,
Aug 16, 2011, 9:28:40 AM8/16/11
to google-map...@googlegroups.com
I'm trying to adjust the onclick:() function so it selects more categories from my database but it doesn't work out! Hopefully someone can help me with this problem:

Script original, only checks the first category:
<input type="checkbox" id="catbox" onclick="boxclick(this,'cat1')"/> 

I already tried more events in the onclick function, but this only works out for the first 2 events:
<input type="checkbox" id="catbox" onclick="boxclick(this,'cat1');boxclick(this,'cat2');boxclick(this,'cat3')"/> 

I also have tried this, but it doesn't work out:
<input type="checkbox" id="catbox" onclick="boxclick(this,'cat1','cat2',cat3')"/> 

Hopefully someone knows the answer!

davie

unread,
Aug 16, 2011, 10:52:50 AM8/16/11
to Google Maps JavaScript API v3
Hi
This is a javascript issue
see http://www.w3schools.com/jS/js_functions.asp about user defined
functions
Regards Davie
Reply all
Reply to author
Forward
0 new messages