I have a hidden div that is shown in a facebox modal window once the edit info button is clicked.
<div id="editlog" style="display:none">
<h3>Enter a new weight and/or photo.</h3>
<form id="editlogform" action="editweight.php" method="post" enctype="multipart/form-data">
<input type="hidden" id="edittrigger" />
<table width="400" cellpadding="0" cellspacing="6" border="0">
<tr><td>New Weight.</td></tr>
<tr><td><input type="text" name="weight" id="weight" maxlength="3" /></td></tr>
<tr><td>New Photo</td></tr>
<tr><td><input type="file" name="photo" /></td></tr>
<tr><td><input type="button" value="submit" id="editlogsubmit" class="button"></td></tr>
</table>
</form>
</div>
As you can see it also passes a photo. Here is the jquery to submit the form.
$('#editlogsubmit').live('click', function() {
$('#editlogform').ajaxSubmit({
success: function(data) {
alert(data.t);
}
});
});
I on the server side I print_r()
the variables and they are all empty? I can only pass something if I use jquery to grab the value using the id, not the name. I think it may have something to do with the fact that the div is in a modal but I am not sure. Any ideas on why the variables are empty?