Thanks for the update, I had tried something similar, although did not
succeed as quotes were converted to ".
Here is what I attempted:
<?php echo $html->link(
$html->image('navigation/nlOn-curved.gif'),
'http://www.external.com',
array(
'onmousever'=>'changeImages("nav01",
"images/nlOn-curved.gif");
return true;'
),
null, false) ?>
Although the above turned out to be:
<a href="http://www.external.com" onmousever="changeImages
("nav01", "images/nlOn-curved.gif"); return
true;"><img src="/wplam/img/navigation/nlOn-curved.gif" alt="" /></a>
So I must be missing something here. Is there a way to force or escape
the quote to be literal as opposed to being converted?
On Feb 7, 4:10 pm, Simz <[email protected]> wrote:
> use the html helper
> :http://book.cakephp.org/view/206/Inserting-Well-Formatted-elements
>
> image(string $path, array $htmlAttributes = array())
>
> in your view (inside a php block)
>
> echo $html->image(
> "menu1.jpg",
> array(
> "onmouseover"=>"yourJsRollOverFunc()",
> "onclick"=>"jsFunc()",
> "class"=>"mycssclass"
> )
> );
>
> wrap the php block with your link...
> this should do the trick
>
> On Feb 6, 10:14 pm, Zolthar <[email protected]> wrote:
>
> > Learning cake/programming for the first time so please excuse me if
> > this is a very noob question. I have tried to search this board
> > without much success - as the responses were either too complicated or
> > possibly I searching with the wrong keywords.
>
> > What I am after is how do I get a linked image to swap like
> > onmouseover using javascripts (or any other option)?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---