Forum Moderators: open

Message Too Old, No Replies

XHTML Strict validation help

need it

         

Tonearm

4:38 pm on Dec 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm confused about a couple things I'm getting from the w3c XHTML 1.0 Strict validator.

These errors:

1. cannot generate system identifier for general entity "prefcode"
2. general entity "prefcode" not defined and no default entity
3. reference not terminated by REFC delimiter
4. reference to external entity in attribute value
5. reference to entity "prefcode" for which no system identifier could be generated
6. entity was defined here

are caused by this:

<a href="http://www.domain.com/page.jsp?aid=01234&prefcode=ABC"

This error:

1. document type does not allow element "input" here

is caused by this:
<div>
<div>
<div>
<form action="action" method="post">
<input type="hidden" name="name" value="value" />
<input name="name" size="15" type="text" />
<input type="submit" value="Submit" />
</form>
</div>
</div>
</div>

Can anyone help clear this up?

Hester

4:42 pm on Dec 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The link needs to have the ampersand written as "&" plus "amp;".

Tonearm

5:23 pm on Dec 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Nice, thanks Hester.

One other thing is I had to remove the target attribute of the anchor tag. How can I open something in a new window without using Javascript?

RonPK

6:55 pm on Dec 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> How can I open something in a new window without using Javascript?

You can't, AFAIK.

A solution is to use JavaScript to add the target attribute, i.e. without using window.open().

encyclo

6:56 pm on Dec 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How can I open something in a new window without using Javascript?

You can't - either in XHTML 1.0 Strict or HTML 4.01 Strict. Obviously, it will still work if you use

target="_blank"
, but if you want it to validate, then you should use a transitional doctype.

This earlier thread [webmasterworld.com] might help.

Tonearm

7:13 pm on Dec 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks guys. I fixed the <input> problem by wrapping my input tags in divs. The only problem there is IE wants to add about a pixel of vertical space for each div. Anything I can do about that?

encyclo

7:33 pm on Dec 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



From your original markup sample above, you don't need to add divs around each
input
, you just need to move the
<form>
and
</form>
tags outside of the containing divs.

g1smd

7:19 pm on Dec 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Why have you got three nested divs anyway?

That looks like needless code bloat.