Tuesday, November 25, 2008

Re: $html->link() on button

I think you want something like this:

<button onclick="location.href='<?php echo $html->url('/controller/
action'); ?>';">Click me</button>

hth
grigri

On Nov 25, 9:03 pm, "Diego Villar" <dmvil...@gmail.com> wrote:
> Hi guys,
>
> how to use the helper $html->link() in a href
> button?
>
> I try to use links such as buttons:
> <input type = 'button' value = 'Link' onClick = "location.href ( '<?
> php echo $html->link(What is this?) ?>')">
>
> any ideas?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: