Welcome Guest, Not a member yet? Register   Sign In
How can I ask for confirmation before opening an anchor?
#2

For that you have to use JavaScript as the folowing native e.g.

Code:
<a href="#" onclick="if (confirm('Wollen Sie diese Domain wirklich löschen?')) { location.href = 'your_link'; } return false;">
My Link
</a>

Your e.g. should work like that (untested, because i never use a helper like that).

PHP Code:
<?php echo anchor("main/confirmSent/$r->Submitted"'Mark Sent', array(
    
'class' => 'button icon approve',
    
'onclick' => "if (confirm('Wollen Sie diese Domain wirklich löschen?')) { location.href = 'your_link'; } return false;"
)); ?>

Reply


Messages In This Thread
RE: How can I ask for confirmation before opening an anchor? - by Rufnex - 11-19-2014, 11:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB