Hello all,
I have a curious javascript problem. I have written code to autocomplete select boxes depending on the contents of the previous select box (choose country, filters cities. choose city, filters attractions in that city, etc), populated from a mysql database.
I figured out how to refresh the page and send variables back to the page via the http GET feature in order to populate other boxes that the user had previously selected with some code:
This works great. However, when I add another line, very similar to the others, it suddenly breaks my page refresh functionality:Code:function reloadCountry(form) { var val=form.country.options[form.country.options.selectedIndex].value; var term=form.term.options[form.term.options.selectedIndex].value; var provider=form.provider.options[form.provider.options.selectedIndex].value; var language=form.language.options[form.language.options.selectedIndex].value; self.location='progSearch.php?country=' + val + '&term=' + term + '&provider=' + provider + '&language=' + language; }
Any idea why this may be happening? Is there a variable limit to js that i don't know, or perhaps is prefix a reserved variable name?Code:var prefix=form.prefix.options[form.prefix.options.selectedIndex].value;
Thanks,
Nathan




Bookmarks