Ampersands in Attribute Values

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
C_Calav
Forum Contributor
Posts: 395
Joined: Wed Jun 02, 2004 10:55 pm
Location: New Zealand

Ampersands in Attribute Values

Post 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
crabyars
Forum Commoner
Posts: 37
Joined: Thu Jun 17, 2004 8:24 pm

Post 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" />
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

I believe its to make it XHTML compliant
User avatar
C_Calav
Forum Contributor
Posts: 395
Joined: Wed Jun 02, 2004 10:55 pm
Location: New Zealand

Post 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..
User avatar
vigge89
Forum Regular
Posts: 875
Joined: Wed Jul 30, 2003 3:29 am
Location: Sweden

Post 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 :/
User avatar
C_Calav
Forum Contributor
Posts: 395
Joined: Wed Jun 02, 2004 10:55 pm
Location: New Zealand

Post 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.
rehfeld
Forum Regular
Posts: 741
Joined: Mon Oct 18, 2004 8:14 pm

Post by rehfeld »

its been a while since i used dreamweaver, but i think there was a setting for that...
Post Reply