Page 1 of 1

Ampersands in Attribute Values

Posted: Sun Nov 21, 2004 11:41 pm
by C_Calav
hi guys,

the last thing i have to validate on my page are the query strings.

now i changed all the '&' to '&' and it didnt change a thing when i tried to validate it.

i validated this page: http://www.modelaircraft.co.nz/commercial.php

or the validated link:http://validator.w3.org/check?uri=http%3A%2F%2Fwww.modelaircraft.co.nz%2Fcommercial.php

and got 13 errors.

for example
...m1" method="post" action="cart.php?action=add_item&id=68&qty=1"/>


changed the &'s and still get 13 of the same errors. am i missing something here? is it the &'s that is giving me problems?

thanx guys

Posted: Mon Nov 22, 2004 4:43 pm
by crabyars
changed the &'s and still get 13 of the same errors. am i missing something here? is it the &'s that is giving me problems?
I think so, could you add those "&" back to the page so we can check it out again?

Also, there are trailing slashes on some of the form input tags. I might be out of touch, but I don't remember ever using those (is it some kind of XML formatting or something?)

Code: Select all

<input type="hidden" name="url" value="commercial" />

Posted: Mon Nov 22, 2004 6:33 pm
by John Cartwright
I believe its to make it XHTML compliant

Posted: Mon Nov 22, 2004 11:53 pm
by C_Calav
the problem was when i changed the '&' to '&' in DreamWeaver when i saved it, DW changed it back to a '&' weird i know. dont know why this happens though..

Posted: Tue Nov 23, 2004 5:02 pm
by vigge89
open the page/script/file/whatever in notepad or something and edit it manually?
I believe i've seen an article about making DW standards compilant, but I can't remember from where :/

Posted: Wed Nov 24, 2004 1:40 pm
by C_Calav
hey guys, edited it in notepad and works a treat now! very werid on DW's behalf unless theres more to it than that.

Posted: Tue Nov 30, 2004 8:35 pm
by rehfeld
its been a while since i used dreamweaver, but i think there was a setting for that...