I've been trying to pass a form value via the confirm button without success, perhaps someone can point me in the right direction?
example.tpl
Code: Select all
<form>
<input type="text" name="usrcomment" value="" />
</form>
<div class="buttons">
<div class="right"><a id="button-confirm" class="button"><span><?php echo $button_confirm; ?></span></a></div>
</div>
<script type="text/javascript"><!--
$('#button-confirm').bind('click', function() {
$.ajax({
type: 'POST',
url: 'index.php?route=payment/example/confirm',
data: $("form").serialize(),
success: function() {
location = '<?php echo $continue; ?>';
}
});
});
//--></script>
Code: Select all
public function confirm() {
$usrcomment = $_POST['usrcomment'];
echo $usrcomment;
}