I have 2 files. 1 html and a js. The html file has check boxes. I'm setting a flag when I select a check box. And this flag has to go in the .js file. Based on whether the flag is set or not, I'll be performing some manipulations in the js file. Basically, how do I do this so that the flag set from the html file is available in the javascript file?
Thank you.
Html file
function checkWIFI(){
if(document.getElementById('wifi').checked == true)
wifiFlag.changeFlag(true);
else
wifiFlag.changeFlag(false);
}
javscript file
wifiFlag = new testFlag();
function testFlag()
{
this.flag = false;
}
testFlag.prototype.changeFlag = function(newFlag)
{
this.flag = newFlag;
}