Hi,
I think you confused what you needed to do.
Remove the {literal} tags completely.
Then, in the javascript, replace any { and } that aren't smarty, with the delims.
I didn't mean for you to use {and}
{if $ispaid}
<!-- Enter any HTML code which should be displayed when a user has completed checkout here -->
<!-- Common uses of this include conversion and affiliate tracking scripts -->
<!-- Start TradeDoubler Conversion Tag Insert on confirmation Page -->
<script language="javascript">
tdconv('init', '2269371', {ldelim}'element': 'iframe' {rdelim});
tdconv('track', 'sale', {ldelim}'transactionId':'{$orderid}', 'ordervalue':'{$total}', 'voucher':'', 'currency':'EUR','event':404916{rdelim});
</script>
<!-- End TradeDoubler tag-->
{/if}