[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Webmasterplein.net • Toon onderwerp - Javascript echoën
Pagina 1 van 1

Javascript echoën

BerichtGeplaatst: 14 jun 2006 13:23
door Remi
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.

Re: Javascript echoën

BerichtGeplaatst: 14 jun 2006 13:26
door KillerSponge
Je moet de quotes in het scriptje backslashen. Dan wordt de quote voor het script genegeerd. Dus gewoon voor elke quote binnen de echo een backslash (\) zetten.

Smile

Re: Javascript echoën

BerichtGeplaatst: 20 jun 2006 15:58
door Remi

Re: Javascript echoën

BerichtGeplaatst: 20 jun 2006 16:40
door KillerSponge

Re: Javascript echoën

BerichtGeplaatst: 20 jun 2006 17:40
door Remi
kan je anders klein voorbeeldje geven.

Re: Javascript echoën

BerichtGeplaatst: 20 jun 2006 18:05
door KillerSponge
Je mag dit niet doen in een echo:

[code="html"]onnmouseover="document.header.src='images/header_orange.gif'"[/code]

In plaats daarvan moet dit t zijn:

[code="html"]onmouseover="document.header.src=\'images/header_orange.gif\'"[/code]

Re: Javascript echoën

BerichtGeplaatst: 21 jun 2006 11:08
door Remi
dankje wel, ik zie al wit verkeerd deed.

Re: Javascript echoën

BerichtGeplaatst: 21 jun 2006 13:58
door KillerSponge
Ok, mooi dat het verholpen is Smile