
July 14th, 2000, 02:02 PM
|
|
Contributing User
|
|
Join Date: Mar 2000
Posts: 60
Time spent in forums: < 1 sec
Reputation Power: 9
|
|
|
Howdy all.
It's Friday, X-Men opens tonight and I can't think straight. So I need a little help.
I have the following code in a page to display an "onmouseovered" link if a certain var is true in a table.
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre><?if ($phorum=='yes') {
echo "<a href='../phorum/list.php4?appno=$appno&entity=$entity&password=$password&num=$phorum_id' onMouseOut='MM_swapImgRestore()' onMouseOver='MM_swapImage('document.messageboard','document.messageboard','../images/on_mssgboard.jpg','#955986178380')'><img name='messageboard' border='0' src='../images/off_mssgboard.jpg' width='173' height='16'></a>";
}
?>[/code]
Because of the way PHP handles single and double quotes, it needs to appear like this in PHP, BUT, the mouseover won't work because the javascript code needs to appear like this to do a mouseover (note the single/double quotes):
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre><a href="../phorum/list.php4?appno=11355&entity=2000&password=test&num=1" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('document.messageboard','document.messageboard','../images/on_mssgboard.jpg','#955986178380')"><img name="messageboard" border="0" src="../images/off_mssgboard.jpg" width="173" height="16"></a>[/code]
Anyone have a clue as to how I can fix this? The mouseover has become a "selling feature" (go figure.) but I am very willing to trash it if it can't be done.
|