Photoshop-Cafe.de :: Dein Photoshop-Forum

Photoshop-Cafe.de :: Dein Photoshop-Forum (https://www.photoshop-cafe.de/forum/index.php)
-   Hilfestellung, Tipps und Tricks (https://www.photoshop-cafe.de/forum/forumdisplay.php?f=30)
-   -   Web-Design Schachtelung (https://www.photoshop-cafe.de/forum/showthread.php?t=1856)

Fobby 01.05.06 22:36

Schachtelung
 
Problemcode:

HTML-Code:

<a href="javascript:void(0);" onmouseover="return overlib('<span style="color: #FFFF00;"> <b> Eisenmaske </b> </span><br />
Helm<br />
Wert: 845<br />
');" onmouseout="return nd();" class="itemTitle">
Eisenmaske</a>

Problem:
Nach onmouseover muss "" kommen.
Ein Javascript-String muss in '' gesetzt werden.
Soweit so gut, aber ...
nun kommt
<span style="color: #FFFF00;">
Durch die " wird das onmouseover beendet, was natürlich nicht sein darf. Ich könnte jetzt einfach die " nach style entfernen, dann würde es gehen, doch das ist nicht w3c-konform.

Jemand eine Idee, wie ich das Problem lösen kann?

vektorpixel 02.05.06 09:13

Anstatt

HTML-Code:

<span style="color: #FFFF00;">
einfach diesen "" ein \ voranstellen:

HTML-Code:

<span style=\"color: #FFFF00;\">
Dies ist eine Variante die in PHP verwendet wird. Ich bin mir nur nicht ganz sicher, ob dies bei JavaScript auch konform ist?!

Fobby 02.05.06 20:49

Das hatte mir woanders auch jemand vorgeschlagen, funktioniert leider nicht.
Habe nun aber eine Lösung:

HTML-Code:

<span style=&quot;color: #FFFF00;&quot;>
Das funktioniert :nixweiss:


Alle Zeitangaben in WEZ +2. Es ist jetzt 22:42 Uhr.

Powered by vBulletin® Version 3.8.7 (Deutsch)
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
©2005-2024 photoshop-cafe.de

Seite wurde generiert in 0,01368 Sekunden mit 8 Queries