aeafisme23 Posted May 2, 2008 Share Posted May 2, 2008 I am trying to get my select box to work without a submit button. I have already made one that works just fine but when i put in php variables it does not seem to work. here is what i got <form> <table width="780" cellpadding="0" cellspacing="0" border="0" align="center"> <tr> <td width="20" valign="top"> </td> <td width=250 valign="top"> <p class="small"> <SELECT NAME="nav" onChange="document.location.href=document.nav.SelectURL.options[document.nav.SelectURL.selectedIndex].value"> <OPTION VALUE="#" SELECTED> - Select a DMA to pull a report - </option> <?php while($results = mysql_fetch_array($sql_address)){ $stationID = $results['station_id']; $dmaID = $results['dma_id']; echo"<option value=\"view_records.php?station=$stationID\">$dmaID</option>"; // Increment the row count $row_count++; } // Free the MySQL resource mysql_free_result($sql_address); ?> </select></p></td>...</form> im pretty sure ive messed this line up somehow to make it not work properly echo"<option value=\"view_records.php?station=$stationID\">$dmaID</option>"; By the way i can get it to work with a submit button but do not want that alternative. Link to comment https://forums.phpfreaks.com/topic/103887-solved-select-box-is-not-going-to-url-on-selection-change/ Share on other sites More sharing options...
aeafisme23 Posted May 2, 2008 Author Share Posted May 2, 2008 wow sorry to post this and topic solve it so fast but i figured it out, i did not name my form and select box correctly.......sigh.... Link to comment https://forums.phpfreaks.com/topic/103887-solved-select-box-is-not-going-to-url-on-selection-change/#findComment-531811 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.