Hi, I have a php file, and I want when the user select an option from a select list, the same php file is called using the variable that the user choose, this is what I did but it does not work:
<script language="JavaScript">
function gotoFunction() {
alert(self.location);
self.location = self.location +"?category=" + document.productGoto.productList.options[document.productGoto.productList.selectedIndex].value;
}
</script>
<table width="90%" cellpadding="4">
<tr >
<td bgcolor="#eeeeff">
<FORM NAME="productGoto">
<FONT FACE="Arial,Helvetica" SIZE="-2">
Select By Category:
<SELECT NAME="productList" onChange="gotoFunction()" onBlur="return options[0].selected = true">
<OPTION VALUE="All">All Categories </OPTION>
<OPTION VALUE="Computing ">Computing</OPTION>
<OPTION VALUE="Competition ">Competition</OPTION>
<OPTION VALUE="Commerce">Commerce</OPTION>
<OPTION VALUE="AuditFirms">Audit Firms</OPTION>
<OPTION VALUE="Government ">Government</OPTION>
<OPTION VALUE="Health ">Health</OPTION>
<OPTION VALUE="Industry ">Industry</OPTION>
<OPTION VALUE="InvestmentAdvisors ">Investment Advisors</OPTION>
<OPTION VALUE="LawFirms ">Law Firms</OPTION>
<OPTION VALUE="MutalFundPages ">Mutual Fund Pages</OPTION>
<OPTION VALUE="NewsViews ">News/Views</OPTION>
<OPTION VALUE="Reference ">Reference</OPTION>
<OPTION VALUE="Transportation ">Transportation</OPTION>
<OPTION VALUE="Travel ">Travel</OPTION>
<OPTION VALUE="WebResearch ">Web Research </OPTION>
<OPTION VALUE="WebPagePage ">WebPage Technology</OPTION>
</SELECT>
</FORM>
Thanks