I have 3 dropdowns used to query database and want to use ajax to refresh and store selections until it passed. Below is Javascript I found to handle the refresh but it will not work in modx. I’m using revo
Code
<SCRIPT language=JavaScript>
function reload(form)
{
var val=form.cat.options[form.cat.options.selectedIndex].value;
self.location=’index.html?cat=’ + val ;
}
function reload3(form)
{
var val=form.cat.options[form.cat.options.selectedIndex].value;
var val2=form.subcat.options[form.subcat.options.selectedIndex].value;
self.location=’index.html?cat=’ + val + ’&cat3=’ + val2 ;
}
</script>
Can this be tweaked to work?