Ik probeer een stuk HTML met javascriptje te echoën, maar dat gaat niet. Dit komt omdat javascript ook ' gebruikt en ak gebruik ik " klopt mijn HTML al helemaal niet meer. wat kan ik hier aan doen??
Hier is de php code:
[code="php"]<?php
$subject = $_GET['subject'] ;
echo '<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" height="250"><img name="header" src="images/header_blue.gif" width="800" height="250" /></td>
</tr>
<tr>
<td colspan="2"><table width="800" height="60" border="0" cellspacing="0" cellpadding="0" background="images/nav_bg.gif">
<tr>
<td width="3"><img src="images/nav_side.gif" width="3" height="60" /></td>
<td width="160"><div align="center"><a href="index.html"
onmouseover="document.header.src='images/header_orange.gif'"
onmouseout="document.header.src='.$subject.'">
<img src="images/nav_home.gif" width="62" height="25" border="0" /></a>
</div>
</td>
<td width="4"><div align="center"><img src="images/nav_stripe.gif" width="4" height="49" /></div></td>
<td width="159"><div align="center"><a href="index.html"
onmouseover="document.header.src='images/header_red.gif'"
onmouseout="document.header.src='.$subject.'">
<img src="images/nav_news.gif" width="59" height="25" border="0" />
</a>
</div>
</td>
<td width="4"><div align="center"><img src="images/nav_stripe.gif" width="4" height="49" /></div></td>
<td width="160"><div align="center"><a href="index.html"
onmouseover="document.header.src='images/header_orange.gif'"
onmouseout="document.header.src='.$subject.'">
<img src="images/nav_porto.gif" width="104" height="25" border="0" />
</a>
</div>
</td>
<td width="4"><div align="center"><img src="images/nav_stripe.gif" width="4" height="49" /></div></td>
<td width="159"><div align="center"><a href="index.html"
onmouseover="document.header.src='images/header_green.gif'"
onmouseout="document.header.src='.$subject.'">
<img src="images/nav_friends.gif" width="76" height="25" border="0" />
</a>
</div>
</td>
<td width="4"><div align="center"><img src="images/nav_stripe.gif" width="4" height="49" /></div></td>
<td width="137"><div align="center"><a href="index.html"
onmouseover="document.header.src='images/header_purple.gif'"
onmouseout="document.header.src='.$subject.'">
<img src="images/nav_contact.gif" width="81" height="25" border="0" />
</a>
</div>
</td>>
<td width="3"><img src="images/nav_side.gif" width="3" height="60" /></td>
</tr>
</table>';
?>[/code]
De onmouse outs zijn goed, maar niet de onmouseovers.