volgens xhtml mag je geen name="" gebruike...

nu heb ik dit script.
_________________________________________

<img src="img/layout/affiliate.bmp" name="button" alt="Affiliate" width="88" height="31" />

<?php
//blablabla

echo "<a href=\"javascript:newvenster('".$aaff['url']."')\" onmouseover=\"document.button.src=image".$i.".src\" onmouseout=\"document.button.src=image00.src\">".$aaff['name']."</a><br />\n";

//blablabla
?>

_________________________________________

en daar moet ik tog egt (lijkt mij) een name=button geve omdat anders niet het plaatje word aangepast. weet iemand een manier waarop dit principe ook werkt en dan xhtml 1.0 strict.

btw dit is wat w3c zegt:
_________________________________________
Line 248, column 42: there is no attribute "name"

... src="img/layout/affiliate.bmp" name="button" alt="Affiliate" width="88" heig

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute.
_________________________________________

niet egt een andwoord waar je wat aan hebt..
title of alt of id

name mag niet meer ;)
alt="" is voor als je je muis over het plaatje houd dan krijg je een gele tekst. dit is in xhtml1.0strict verplicht en staat erin

id, title zijn goed volgens xhtml1.0strict
maar.... dan werkt het hele mousover gebeure niet...

strange :s
id moet je gebruiken. Zie Mijnhomepage - Links ergens zie je Xhtml staan

Trouwens, ik raad het niet aan om strict te gebruiken, gebruik gewoon trantional. Enne, ondersteunt je browser 'id' wel, want dat is soms ook de vraag.
jah idd zover was ik ook. maar het probleem bij id is dat het script dan niet werkt. misschien komt het door het javascript...:

------------------------------------------------------------

<script type="text/javascript">
if (document.images)
{
image00 = new Image
image00.src = "img/layout/affiliate.bmp"

image1 = new Image
image1.src = "http://www.zeldalegends.net/images/zl-button.gif";

image2 = new Image
image2.src = "http://www.zhq2.com/images/affiliates/zhq.jpg";


}
</script>

<img src="img/layout/affiliate.bmp" id="button" alt="Affiliate" width="88" height="31" />

<a href="javascript:newvenster('http://www.zelda4ever.com')"; onmouseover="document.getElementById['button'].src=image1.src" onmouseout="document.getElementById['button'].src=image00.src">link 1</a><br />
<a href="javascript:newvenster('http://www.zelda4ever.com')"; onmouseover="document.getElementById['button'].src=image2.src" onmouseout="document.getElementById['button'].src=image00.src">link 2</a><br />

------------------------------------------------------------
Sebastiaan schreef op 24.07.2005 19:31
id moet je gebruiken. Zie Mijnhomepage - Links ergens zie je Xhtml staan

Trouwens, ik raad het niet aan om strict te gebruiken, gebruik gewoon trantional. Enne, ondersteunt je browser 'id' wel, want dat is soms ook de vraag.


Altijd strict gebruiken als het mogelijk is mijn advies :/
oke oke.

maar weet nietmand hoe dit principe werkent te krijge?
op mijn manier (bovenstaand) lukt het niet...
een lijn om dit af te sluite:
__________________________________________

ik heb een nieuw scriptje gesgreve (kleiner XD)

--------------------------------------
<script type="text/javascript">
function tes(url) {
var edit;
var HuidigeTekst = document.test.src;
edit = url;
document.test.src=edit;
return;
}
</script>

<img src="img/layout/affiliate.bmp" name="test" alt="Affiliate" width="88" height="31" /><br />
<a href="#" onmouseover="javascript:tes('affiliate2.bmp')" onmouseout="javascript:tes('affiliate.bmp')">test</a><br />
--------------------------------------

nu gebruik ik in de img een name (het script werkt nu maar w3c geeft een fout)
als ik die name verander in id dan is w3c tevrede maar werkt het script niet :s
hint: getElementById()
Dan wordt het dus:
document.getElementById('test').src=test.
Ik raad echter wel een css-only manier aan, bijvoorbeeld de sliding doors-techniek.
hehehe super :D

ik deed
document.getElementById['test'].src
maar het moet dus:
document.getElementById('test').src

thx man

wat moet ik me voorstellen met de door jouw benoemde techniek?
kan je een voorbeeld geve / uitleg

Reageren