Page 1 of 1

onmouseover

Posted: 11 Sep 2011, 16:25
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!

Re: onmouseover

Posted: 12 Sep 2011, 18:13
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

Re: onmouseover

Posted: 12 Sep 2011, 22:48
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!

Re: onmouseover

Posted: 13 Sep 2011, 00:18
by Jan
Ok