onchange, post and page refreshing

From: Date: Fri, 21 Mar 2003 09:46:47 +0000
Subject: onchange, post and page refreshing
Groups: php.general 
Request: Send a blank email to php-general+get-140575@lists.php.net to get a copy of this message
hi there in my form i have a function to output a number of upload form boxes , this function will post the ammount function number_upload_boxes($num_boxes){ echo '<form name="count_form" method="post" action="'.$_SERVER['PHP_SELF']."?".$this->url("action", "action=addphotos").'">'."\n"; echo 'Number of Photos To Upload:<br>'."\n"; echo ' <select name="boxes" onChange="document.count_form.submit()">'."\n"; for ($i = 1; $i <= $num_boxes; $i++) { $i == $this->post['boxes'] ? $selected="selected" : $selected=""; echo '<option value="'.$i.'" '.$selected.'>'.$i.''."\n"; } echo ' </select>'; echo '</form>'; } although once i select it , it refreshes the whole page and i lose my content already on the page , is there anyway to stop this ?

« previous php.general (#140575) next »