mardi 29 mai 2018

html checkbox unclick hides function variables

I have checkboxes created with labels:

<label><input type="checkbox" />ATL6101</label><br>

ATL6102
ATL6103
ATL6104
ATL6105

This corresponds to a function variable.

            Microsoft.Maps.loadModule('Microsoft.Maps.Directions', function () {

getRoute('4200 N COMMERCE DR,30344-5707','822 RALPH MCGILL BLVD NE,30306','','','','','','','','','','','','','','','Green','ATL6101');

getRoute('4200 N COMMERCE DR,30344-5707','4575 WEBB BRIDGE RD,30005','','','','','','','','','','','','','','','Lime','ATL6102');

getRoute('4200 N COMMERCE DR,30344-5707','520 W PONCE DE LEON AVE,30030','','','','','','','','','','','','','','','Maroon','ATL6103');

getRoute('4200 N COMMERCE DR,30344-5707','575 OLYMPIC DR,30601','','','','','','','','','','','','','','','Navy','ATL6104');

getRoute('4200 N COMMERCE DR,30344-5707','3470 MCCLURE BRIDGE RD,30096','','','','','','','','','','','','','','','Lime','ATL6105');




        });
    }

How can I say if the checkbox is not clicked ignore the function variable? And is there a way I can replace the values in the function and dynamically create the checkboxes?




Aucun commentaire:

Enregistrer un commentaire