rhyno Posted February 13, 2008 Share Posted February 13, 2008 OK here is my issue.... I have a dropdown select box that I need to reload the page with that dogs information... But alas it does not work... <?php ='<form name="goldenmale" onchange="gallery.php?dogid='.$rowmg['dogid'].'"> <select name="MaleGoldens"> <option></option>'; while($rowmg=mysql_fetch_assoc($rsMaleGoldens)) { echo '<option name="'.$rowmg['callname'].'">'.$rowmg['callname'].'</option>'; } echo '</select> </form>' What am I doing wrong and how can I fix it... Link to comment https://forums.phpfreaks.com/topic/90949-php-onchange-causing-page-to-reload/ Share on other sites More sharing options...
Isityou Posted February 13, 2008 Share Posted February 13, 2008 <select name="menu" onChange="location=document.jump.menu.options[document.jump.menu.selectedIndex].value;" value="GO"> <option value="gallery.php?dogid=$rowmg['dogid']">$rowmg['callname'></option </select> Link to comment https://forums.phpfreaks.com/topic/90949-php-onchange-causing-page-to-reload/#findComment-466131 Share on other sites More sharing options...
rhyno Posted February 13, 2008 Author Share Posted February 13, 2008 I've inserted this into my php file and put it on the server and it does not work. echo '<select name="menu" onChange="location=document.jump.menu.options[document.jump.menu.selectedIndex].value;" value="GO"> <option>Please Select</option>'; while($rowmg=mysql_fetch_assoc($rsMaleGoldens)) { echo '<option value="gallery.php?dogid='.$rowmg['dogid'].'">'.$rowmg['callname'].'</option>'; } echo '</select>'; Link to comment https://forums.phpfreaks.com/topic/90949-php-onchange-causing-page-to-reload/#findComment-466142 Share on other sites More sharing options...
Isityou Posted February 13, 2008 Share Posted February 13, 2008 Replace 'jump' with the forms name. or name the form <form name="jump> Link to comment https://forums.phpfreaks.com/topic/90949-php-onchange-causing-page-to-reload/#findComment-466146 Share on other sites More sharing options...
rhyno Posted February 13, 2008 Author Share Posted February 13, 2008 Thank you... works like a charm.. Link to comment https://forums.phpfreaks.com/topic/90949-php-onchange-causing-page-to-reload/#findComment-466222 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.