I need a YES/NO prompt before a link is fired. I've tried several solutions I found on but none worked out fine. None did even block the firing of the link, except confirm(). But confirm() does not give me the chance to change stuff or change the button labels. I want to add a value to the url depending on what the user chose. Another problem is that I have a list of these links on the page (events). Any help would be appreciated.
EDIT 1
$("a").click(function(e) {
e.preventDefault();
});
is not working and in this case I don't know how to access the url. And I just want to postpone the calling of the url.
Edit 2 This is the code for the creation of the link (cakephp):
echo $this->Html->link(
$this->Html->image('image.png',array(
'title' => __('title'),
'alt' => __('title')
)),
array(
'action' => 'action',
$eventId,
$anotherVar,
$this->Paginator->current(),
$customerId
),
array('escape' => false)
);
Now I want to ask the customer a YES/NO question and depending on what the customer choose add another parameter to the url.
EDIT 3 The html code created thru the code above:
<a href="/system/controller/function/value1/value2">