In a template I have defined a script block:
<xmod:ScriptBlock BlockType="ClientScript" RegisterOnce="True" ScriptId="processmanualpayment">
<script type="text/javascript">
function OpenPaymentWindow(paymentid) {
var dest='/office/process_manual_payment/p/'&paymentid;
document.location.href=dest;
}
</script>
</xmod:ScriptBlock>
Then in the body of the template itself I have this:
<xmod:commandButton text="Process Manual Payment" width="220" onclientclick='[[Join("OpenPaymentWindow(""{0}""); return false;", [[Id]])]]'/>
But when I click the button the page just refreshes
What am I doing wrong?
Edited to add that I thought I had found the answer using the redirect tag of the command button:
<xmod:commandButton text="Process Manual Payment" width="220" redirect='[[Join("/office/process_manual_payment/p/{0})", [[Id]])]]'/>
Nope - page just refreshes!