therefore, I am new to using jquery.post (), but I am not using methods that I have not used before.
I am trying to post two hidden input values when a button is clicked:
$('#button').live('click', function() {
$.post('export_file.php', { group: form.group.value , test: form.test.value },
function(output) {
$('#return').html(output).show();
});
});
I checked that the button event completed successfully, and currently everything I try to do in export_file.phpis something of an echo.
here is my form:
<form name="form">
<input type="hidden" name="group" value="<?echo $group;?>">
<input type="hidden" name="test" value="<?echo $test_id;?>">
<input type="button" class="Mybutton" id="button" name="btnSubmit" value="Export Results">
</form>
I have my div on the original page:
<div id='return'></div>
export_file.php:
<?php
echo "whatever, something!";
?>
Can anyone please indicate where I am wrong. Many thanks,
source
share