This is the Javascript function:
function auto_submit(for m_name, value) {
document.form_n ame.elements[value].click();
}
This is the XHTML:
<select name="category" onchange="auto_ submit(this.for m.name,'Select' )">
So, when choosing an option from the select list, the Select button is
clicked and the form is submitted. Somehow the function only works when
I replace form_name variable with the name of the form. Ex.
document.keycha in_selector.ele ments[value].click();
How can this be solved?
function auto_submit(for m_name, value) {
document.form_n ame.elements[value].click();
}
This is the XHTML:
<select name="category" onchange="auto_ submit(this.for m.name,'Select' )">
So, when choosing an option from the select list, the Select button is
clicked and the form is submitted. Somehow the function only works when
I replace form_name variable with the name of the form. Ex.
document.keycha in_selector.ele ments[value].click();
How can this be solved?
Comment