onmouseover

Phoca Gallery plugins - plugins for Phoca Gallery extension
phox
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 16 Aug 2011, 20:02

onmouseover

Post by phox »

Hello, Im trying to modify the phocagallery.php file (plugins/content...) and to add a mousovereffect. Somehow, when I try to add code to the $output-variable code like this:

<img id ="" src='.$imagearray[1].' onmouseover="alert("hello");" name="a" width="898" height="429" border="0" id="a" />

I get this output:
<img id="" width="898" height="429" border="0" name="a" hello");"="" onmouseover="alert(" src="/wwwnew/Joomla_1.6/images/phocagallery/testredakteur-kuestler20-a5c6/animacin simple2.jpg">

which is of course not working...maybe anyone knows why the code is twisted like that, Im thankful for any input!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: onmouseover

Post by Jan »

Hi, you need to follow the coding rules:

Code: Select all

"alert("hello");"
you cannot use the same quotes for not ending the first quote, so it should be done like this e.g.:
'alert("hello");'
etc.

Jan
If you find Phoca extensions useful, please support the project
phox
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 16 Aug 2011, 20:02

Re: onmouseover

Post by phox »

I tried that at the beginning but as the variable $output startet with = ' it didnt work. I simply forgot to escape it with a backslash \'. Thanks a lot!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: onmouseover

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
Post Reply