On Thu, Sep 30, 2010 at 12:58 PM, Tomfox Wiranata
<[email protected]> wrote:
> thx..i found sth but i am not sure how to proceed.
>
> I am using the $html->link to open the popup
>        echo $html->link($user['User']['username']." folgt diesen
> produkt",array('controller'=>'users', 'action'=>'profile'),
> array('class'=>'title'));
>
>
> when i click this link a jquery function reacts to it because of the
> class "title" and opens my popup
> $(document).ready(function() {
>
>
>
>        //When you click on a link with class of poplight and the href starts
> with a #
>        $('.title').click(function() {
>
>                $('.popup_block').fadeIn('fast');
>
>        });
>
>        function close(){
>                $('.popup_block').fadeOut('fast');
>        }
>
>
> });
> </script>
>
> due to the current code i get redirected to the view "profile"....but
> i want this redirection out, gone...

This really has nothing at all to do with Cake. You should study the
jquery docs or ask on their list. But the gist of it is:

$('.title').click(function(ev) {
    ev.preventDefault();
   var href = $(this).attr('href');

    // fetch data from href using AJAX and display in pop-up ...
}

> and if i do that i get an error...

We're not psychic.

> so how can i open my popup without using a direction in $html-
>>link?? i like $html->link cause the mouse cursor turns into a hand
> and makes it transparent to the user, that this is an acutal link

Aside from what I showed above, you can always use the CSS rule,
"cursor: pointer".

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to