I listed the select#status three times in the jquery, just trying to find one that would pass info. Seems like the variable is just never created so there is no value to hook on to. The text fields work fine. I am not able to determine if the select options are being ignored.
The form:
PHP Code:
<form method="post" action="csmemberchangepost.php" style='background:#cccccc'>
<select name="m_id">
<?php showmem();?>(This lists the members in a drop down list. Provides the member id)
</select>
<p style='font:16px Arial'><label for "name">Name</label><br><input type="text" size="60" name="name" style='font:16px Arial'></p>
<p style='font:16px Arial'><label for status>Status</label><br>
<select size="3" name="status" id="status">
<option value='Verified' style='font:16px Arial;width:150px;text-align:center'>Verified</option>
<option value='NonVer' style='font:16px Arial;width:150px;text-align:center'>NonVer</option>
<option value='New' style='font:16px Arial;width:150px;text-align:center'>New</option>
</select></p>
<p style='font:16px Arial'><label for "special">Special Instructions</label><input type='text' size='60' name='special' style='font:16px Arial'></p>
<p style='text-align:center;margin-top:1em;'><input type="submit" id="submit" value="Update File" style='font: bold 20px Arial'></p>
</form>
The jquery:
Code:
<script src="jquery.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$("#submit").click(function(){
if($("input[name='name']").val() === ''){alert("Name must be entered.");return false;}
if($("input[name='special']").val()===''){alert("Special entry must be made");return false;}
if($("select#status option").val()===''){alert("Make a selection in the Status field");return false;}
if($("#status option:selected").val()==='null'){alert("Make a option:selected in the Status field");return false;}
if($("select#status option").val()==='null'){alert("Make a status option in the Status field");return false;}
});
});
</script>