Page 1 of 1
onmouseover problem
Posted: Sun Apr 20, 2003 6:11 am
by antas
how can I do to eliminate the link that appears on the status bar when the mouse is on one of the links printed wiht this echo?
I have something like this:
echo "<a href='download.php?file=$dfile' target='_blank'>File</a><br>;"
I tried a lot of things, but unsuceccsfuly.
thakns
Posted: Sun Apr 20, 2003 6:20 am
by twigletmac
You can't solve this with PHP - this is a JavaScript problem - so I've moved it to the Client Side forum.
Why don't you post what you've tried so that those more JavaScript inclined can help you sort the problem.
Mac
Posted: Sun Apr 20, 2003 6:35 am
by patrikG
Try
Code: Select all
echo "<a href='download.php?file=$dfile' target='_blank' window.status='This is a link to $dfile'>File</a><br>;"
window.status displays the text specified in the window status-bar.
?>
Posted: Sun Apr 20, 2003 7:07 am
by antas
still nothing!

Posted: Sun Apr 20, 2003 7:19 am
by patrikG
Gah, still hung over from last night.
Do it like this:
<a href='download.php' target='_blank' onMouseOver="status='This is a link to me'; return true;" onMouseOut="status='This was nada'">blalalal</a>
Posted: Sun Apr 20, 2003 7:21 am
by antas
Parse error: parse error, unexpected T_STRING, expecting ',' or ';'
Posted: Sun Apr 20, 2003 7:25 am
by patrikG
I pasted HTML, not PHP. Escape the double-quotes " with \" when you echo them.
Code: Select all
<?php
echo "
<a href='download.php' target='_blank' onMouseOver="status='This is a link to me'; return true;" onMouseOut="status='This was nada'">blalalal</a>
"
?>
Now I am off to bed again and cure my hang-over.
Posted: Sun Apr 20, 2003 7:26 am
by patrikG
forgot the bloody semi-colon at the end of the echo.
;
Posted: Sun Apr 20, 2003 9:39 am
by antas
Thank You very much!
I't worked great!

)
Posted: Wed Apr 23, 2003 2:22 pm
by nigma
I cannot test this but I am pretty sure that you could do it this way:
echo <<<LINK
<a href="link.php?var=varData" onMouseover="window.status='Ding Dong'; return true" onMouseout="window.status=' '; return true">Link</a>
LINK;
I find this much easier, but that is just personal oppinion.
Tell me if it works?