Hi everyone, I have a very weird issue here. I'm posting values using a dropdown box by using Onchange function in javascript. When I select any value in the dropdown only the first time the value is posted, but when I click the same dropdown and select some other value, it only calls the javascript function but does not submit the value. Please help me here.. My code is <select name="classList" onchange="refresh();"> <option value="">--select--</option > <?php foreach($Class as $cls) { ?> <option value="<?php echo $cls['class'] ?>"<?php if($cls['class']==@$classList) echo "selected"; ?>> <?php echo $cls['class'] ?></option> <?php } ?> </select> Code (markup): And the javascript code is function refresh() { document.formName.action=""; document.formName.submit(); } Code (markup):
This is a javascript problem, not PHP. You should show the entire HTML page or link to an online page we can try.