Hi,
I have written a template for preferences to set for my tool. It does have a FORM, RADIO buttons, CHECKBOX and the BUTTON.
1. The button has to save the changes made to the form and update the form. but some how onclick event is not fired when I click on the button. I did pasted my template on domplate Runner to debug, but I see the same behavior.
2. Also Can I trigger any onclick/onchange event when the radio button is selected ?
Please find my template below.
var ruleset_data = {
ruleset_description: "rule description",
ruleset_author: "rule author"
}
var template = domplate(
{
tag:
DIV({class:'rulesets'},
DIV({class: 'ai-ruleset'}, "Select Ruleset"),
TABLE({class: 'ai-ruleset-table', cellspacing: 0, cellpadding: 0, border:1},
TBODY(
TR(TD({onclick:"highlight", id: "IITAA20", _index: '0'}, "IITAA2.0 (0.5 beta)")),
TR(TD({onclick:"highlight", id: "WCAG20T", _index: '1'}, "WCAG2.0 ARIA Transitional (0.5 beta)")),
TR(TD({onclick:"highlight", id: "WCAG20S", _index: '2'}, "WCAG2.0 ARIA Strict (0.5 beta)"))
)//end TBODY
),
BR(),
DIV('Description'),
TEXTAREA({class: 'textar'},
"$ruleset_data.ruleset_description"
),
BR(),
DIV('Author'),
TEXTAREA({class: 'textara'}, "$ruleset_data.ruleset_author"),
BR(),
H3('Select 2.0 Success Criteria Level'),
FORM({},
INPUT({ type: 'radio'}, "Level A, AA and AAA (highest level of accessibility)"),
BR(),
INPUT({ type: 'radio'}, "Level A and AA"),
BR(),
INPUT({ type: 'radio'}, "Level A (lowest level of accessibility)")
),
BR(),
H3('Other Options'),
FORM({},
INPUT({class: 'formElements', type: 'checkbox'}, "Enable checking for broken links"),
BR(),
INPUT({class: 'formElements', type: 'checkbox'}, "Show 'Accessibility' menu in main menu")
),
BR(),
BUTTON({class: 'button', checked: "true", type: "checkbox", onclick: "$onRulesetChange"},
"Save Changes"
),
BUTTON({class: 'button', checked: "true", type: "checkbox", onclick: "$onRulesetChange"},
"Restore Default Preferences"
)
),
onRulesetChange : function(event){
alert("alert");
}
});
And I am using Firebug1.10.a5
Thanks,
Prasanna