Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: PHP
Hi all,
i am try to do a mouseover event in php but unable to this.
This the code working fine..
<div id="main-icon">
<div class="main-icon-left">
 <a href="../index.php"><img src="pb-images/icon-right.png" width="49" height="47" border="0" name="icon right"  alt="icon right" title="icon right" onMouseOver="this.src = 'pb-images/icon-right-hr.png';"  önMouseOut="this.src = 'pb-images/icon-right.png';"></a>
</div>
<div class="main-icon-right"> <a href="machines/binding.php"><img src="pb-images/icon-left.png" width="49" height="47" border="0" name="icon right"  alt="icon right" title="icon right" onMouseOver="this.src = 'pb-images/icon-left-hr.png';"  önMouseOut="this.src = 'pb-images/icon-left.png';"></a></div>
</div>

 
But using this code in php
<div id='main-icon'>
<div class='main-icon-left'>
 <a href='../index.php'><img src='pb-images/icon-right.png' width='49' height='47' border='0' name='icon right'  alt='icon right' title='icon right' onMouseOver='this.src = 'pb-images/icon-right-hr.png';'  önMouseOut='this.src = 'pb-images/icon-right.png';'></a>
</div>
<div class='main-icon-right'> <a href='machines/binding.php'><img src='pb-images/icon-left.png' width='49' height='47' border='0' name='icon right'  alt='icon right' title='icon right' onMouseOver='this.src = 'pb-images/icon-left-hr.png';'  önMouseOut='this.src = 'pb-images/icon-left.png';'></a></div>
</div>";
In this the onmouseOver and onmouseOut not working..
If anybody have any idea related to this then please Let me know ASAP
 
thanks
Posted 18-Nov-12 20:09pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Check your colon an semicolon in mouse out event handler declaration. You can even see it here on CPwhat is wrong Smile | :)
  Permalink  
Comments
Rajeshkrathor at 19-Nov-12 2:30am
   
thanks
I did not get you?
i have put all there is no error coming but event not firing.
 
Can you send the code what you want to say.
n.podbielski at 19-Nov-12 3:25am
   
Look closely to your second code snippet. Is entire code for handle in handler placeholder? HINT: is in BLUE as html attribute should be? Or it is ending at some point and it is RED?
 
And I really suggest you to use web browser console to chceck for errors like this. It will save you tons of time.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Hi all,
i found the ans just change the code with this
 <img src="../../pb-images/icon-left.png" width="49" height="47" border="0" name="icon right" alt="icon right" title="icon right" onmouseover="\"this.src" this.src="../../pb-images/icon-left.png" hold=" /><br mode="></img>
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 469
1 CHill60 465
2 OriginalGriff 325
3 PIEBALDconsult 285
4 BillWoodruff 193


Advertise | Privacy | Mobile
Web01 | 2.8.141015.1 | Last Updated 19 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100