i have been trying a lot to download exe files using javascript ,i have did it using radio buttons before but now i dont have any idea how should i download .the scenario is there are 3 checkboxes admin,security,security1 ,and i am supposed to check whether which combination of checkboxes are seslected after that on clicking on download button different zip files need to be downloaded .
<button onclick="
if(!this.form.admin.checked&&!this.form.security.checked&&!this.form.security1.checked)
{
document.getElementById('errfn').innerHTML='Make atleast one selection';
}
else if (this.form.admin.checked&&this.form.security.checked&&this.form.security1.checked == 1)
{
alert('security32 and admin and security64');
}
else if (this.form.security.checked&&this.form.security1.checked == 1)
{
alert('security64 and security32');
}
else if (this.form.admin.checked&&this.form.security.checked == 1)
{
alert('security32 and admin');
}
else if (this.form.admin.checked&&this.form.security1.checked == 1)
{
alert('security64 and admin');
}
else if (this.form.admin.checked == 1)
{
alert('admin is checked');
}
else if (this.form.security.checked == 1)
{
alert('security 32 is checked');
}
else if (this.form.security1.checked == 1)
{
alert('security64 is checked');
}
return false;
">Submit</button>
i have replaced alert by location.href="images/download.exe"; to check whether it is getting downloaded by no luck
the code that was working for the radio button was
<input value="1" type="radio" id="1" name="formselector" onclick="displayForm(this)">
function displayForm(c)
{
var radios = document.getElementById("1").value;
location.href="images/WismanWeb 32 bit.exe";
}