I have 4 checkboxes and 8 radio buttons, each checkbox containing 2 radio buttons; I have made the radio buttons to enable only when the corresponding checkbox is selected. Now I have 8 events occurring and need to create onclick function in javascript. So, all I'm trying to do is to run bat file based on the radio buttons selected.
the below code is to enable radio button when checkbox is checked.
function changeThis(sender){
if(a.checked){
p.disabled = false;
q.disabled = false;
} else {
p.disabled = true;
q.disabled = true;
}
if(b.checked){
r.disabled = false;
s.disabled = false;
} else {
r.disabled = true;
s.disabled = true;
}
if(c.checked){
t.disabled = false;
u.disabled = false;
} else {
t.disabled = true;
u.disabled = true;
}
if(d.checked){
v.disabled = false;
w.disabled = false;
} else {
v.disabled = true;
w.disabled = true;
}}
I want to trigger .bat file on these 8 events, using something like this:
var objShell = new ActiveXObject("WScript.Shell");
objShell.Run(filename);
Aucun commentaire:
Enregistrer un commentaire