Thursday, March 18, 2010

Re: Insert JavaScript with PHP included in $html->link, possible?

This should do it:

<?php echo $html->link($html->image("edit.png", array("alt" =>
"edit")), 'javascript:;', array('class' => 'edit', "title" => "edit",
'onclick' => 'toggleId('. $zeile .')'), false); ?>

On Mar 18, 3:39 pm, sebb86 <kahlc...@googlemail.com> wrote:
> Hello,
> i want to isert a mixed Code (javascript and php) into my $html->link,
> but i don't know how to do this.
>
> [javascript with php code]
> "javascript:void(0)" onclick="toggleId('<?php echo $zeile?>');"
> [end code]
>
> [$html->link code]
> <?php echo $html->link($html->image("edit.png", array("alt" =>
> "edit")), ---think i have to insert here--- , $row[$class]['id']),
> array('class' => 'edit', "title" => "edit"), false); ?>
> [code]
>
> Greetings.

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 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

To unsubscribe from this group, send email to cake-php+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

No comments:

Post a Comment