Combining php and javascript
Posted: Sun Nov 02, 2003 2:42 pm
Hi all,
I'm trying to combine this php script:
<p><a href="<?php echo _URLFORLINK1; ?>" alt="<?php echo _ALTFORLINK1; ?>">
<?php $linky1 = _LINK1; if (file_exists($imgpath."1_link-".$language.".gif")) { $linky1 = "<img src=\"".$imgpath."1_link-".$language.".gif\" border=\"0\">"; } echo $linky1; ?></p>
with this javascript:
<a href="index.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image41','','<?php echo $imgpath; ?>2_link-dan.gif',1)"><img src="<?php echo $imgpath; ?>1_link-dan.gif" name="Image41" width="81" height="27" border="0" id="Image41"></a>
The first changes image according to selected language and the secon is a normal mouse over img swap from DreamWeaver.
Any suggestions?
I'm trying to combine this php script:
<p><a href="<?php echo _URLFORLINK1; ?>" alt="<?php echo _ALTFORLINK1; ?>">
<?php $linky1 = _LINK1; if (file_exists($imgpath."1_link-".$language.".gif")) { $linky1 = "<img src=\"".$imgpath."1_link-".$language.".gif\" border=\"0\">"; } echo $linky1; ?></p>
with this javascript:
<a href="index.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image41','','<?php echo $imgpath; ?>2_link-dan.gif',1)"><img src="<?php echo $imgpath; ?>1_link-dan.gif" name="Image41" width="81" height="27" border="0" id="Image41"></a>
The first changes image according to selected language and the secon is a normal mouse over img swap from DreamWeaver.
Any suggestions?