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!
onmouseover
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: onmouseover
Hi, you need to follow the coding rules:
you cannot use the same quotes for not ending the first quote, so it should be done like this e.g.:
Jan
Code: Select all
"alert("hello");"
etc.'alert("hello");'
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 3
- Joined: 16 Aug 2011, 20:02
Re: onmouseover
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!
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact: