PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
mallu
Forum Newbie
Posts: 9 Joined: Thu Aug 21, 2003 10:32 am
Post
by mallu » Wed Aug 27, 2003 9:51 am
Hi there:
I have been trying to use onmouseover since yesterday and its driving me nuts. Any help on this will be much appreciated...
Thanks
Biju
Code: Select all
<SCRIPT language="JavaScript">
function movepic(img_name,img_src) {
documentїimg_name].src=img_src;
}
</SCRIPT>
<?
print ("<table border=0 cellspacing=0 cellpadding=0 align='right'> <tr><td><img src='legend_a.png' border='0' align='right' onMouseOver=movepic('picture','legend_b.png')
onmouseout=movepic('picture','legend_a.png')><IMG NAME='picture' SRC='legend_a.png'></td></tr>");
print ("</table>")
?>
volka
DevNet Evangelist
Posts: 8391 Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger
Post
by volka » Wed Aug 27, 2003 10:01 am
that's your code, but what's the problem?
mallu
Forum Newbie
Posts: 9 Joined: Thu Aug 21, 2003 10:32 am
Post
by mallu » Wed Aug 27, 2003 10:08 am
When I bring the mouse over the image nothing happens...
Biju
JayBird
Admin
Posts: 4524 Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:
Post
by JayBird » Wed Aug 27, 2003 10:09 am
try this
Code: Select all
<?
print ("<table border=0 cellspacing=0 cellpadding=0 align='right'> <tr><td><img src='legend_a.png' border='0' align='right' onMouseOver=movepic('picture','legend_b.png') onmouseout=movepic('picture','legend_a.png') IMG NAME='picture'></td></tr>");
print ("</table>")
?>
Also, this isn't really a PHP problem, and i am not even sure why you are using PHP!?
Mark
mallu
Forum Newbie
Posts: 9 Joined: Thu Aug 21, 2003 10:32 am
Post
by mallu » Wed Aug 27, 2003 10:27 am
Thanks volka... it works now...
mallu
volka
DevNet Evangelist
Posts: 8391 Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger
Post
by volka » Wed Aug 27, 2003 10:27 am
since there's no need for php for this code snippet I made it a static html
Code: Select all
<html>
<head>
<SCRIPT language="JavaScript">
function movepic(img_name,img_src) {
documentїimg_name].src=img_src;
}
</SCRIPT>
</head>
<body>
<table border=0 cellspacing=0 cellpadding=0 align='right'>
<tr>
<td>
<img src='legend_a.png' border='0' align='right'
onMouseOver=movepic('picture','legend_b.png') onmouseout=movepic('picture','legend_a.png') />
<IMG NAME='picture' SRC='legend_a.png'>
</td>
</tr>
</table>
</body>
</html>although I'd quote the onmouse[over|out] property it is working for me
oops, too late
JAM
DevNet Resident
Posts: 2101 Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:
Post
by JAM » Wed Aug 27, 2003 10:35 am
Shouldn't " be used instead of ' when it comes to 'plain' html?
(No not, nagging just because you disliked my not-closing-tags earlier, but it looks odd and funny...
)