Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 20th, 2005, 05:29 PM
CJM
Guest
 
Posts: n/a
Default Validation Errors:

I'm adding some extra features to an intranet-based ASP application...(IE6
clients)

As part of the process, I thought I would give the html a mid-life upgrade,
ie. remove much of the tag-soup, replace with CSS and validate.
I haven't got much time to spend perfecting it, but I thought with a little
bit of effort I could transform the app into something approximating a
professional application.

The app use 3 frame layout: header, options (menu) and content frames. [No,
I'm not introducing full CSS-P at this stage]

Tackling the Options page first, I've hit a few validation errors:

1) Line 16, column 195: document type does not allow element "INPUT" here;
missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV",
"ADDRESS" start-tag

This occurs for each <input> tag in the form.

2) Line 13, column 90: there is no attribute "TARGET"

This is refering to the <form> tag. How do I specifiy the target frame
without this?

3) Line 22, column 9: end tag for "FORM" which is not finished

This refers to the </form> tag - I assume this is grumbling about an empty
form (since all other tags within fail validation)

Below is the source - sorry it's from a DB driven intranet site, so it's
difficult to post a live link rather than code.

Cheers

Chris

[color=blue][color=green][color=darkred]
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>[/color][/color][/color]
Source:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>SND: Options</title>
<link rel="stylesheet" type="text/css" href="Eminox.css">
<script type="text/javascript" src="scripts/Submit.js" defer></script>
<script type="text/javascript" src="scripts/validation.js" defer></script>
</head>
<body>
<div id="options2">
<form method="post" id="frmOptions" name="frmOptions" class="options"
action="" target="content">
<input class="btn" onclick="SubmitSN(frmOptions,'start.asp');"
type="button" value="Home" title="Back to Homepage" id=Home" name="Home">
<input type="text" id="SerialNo" name="SerialNo" size="9"
onkeypress="frmOptions.action='ViewSerial.asp?id=' +frmOptions.SerialNo.value
;" datatype="alpha">
<input size="" type="submit" id="Submit1" value="View" name="ViewSN"
onclick='return validate(this.form, "ViewSerial.asp?id=" +
frmOptions.SerialNo.value);' class="btn" title="View Serial No">
<input onclick='return validate(this.form, "CheckSerial.asp?id=" +
frmOptions.SerialNo.value);' class="btn" type="submit" id="Submit2"
value="Add/Edit" name="Add/Edit" title="Add or Edit Serial No">
<input onclick='return validate(this.form, "XferSerial.asp?id=" +
frmOptions.SerialNo.value);' class="btn" type="submit" id="Transfer"
value="Transfer" name="Transfer" title="Transfer Serial No">
<input onclick='return validate(this.form, "InvoiceSerial.asp?id=" +
frmOptions.SerialNo.value);' class="btn" type="submit" id="Invoice"
value="Invoice" name="Invoice" title="Invoice Serial No">
<input onclick='return validate(this.form, "ChangePwd.asp");'
class="btn_sml" type="submit" id="ChPwd" value="Change Pwd" name="ChPwd"
title="Change Password">
<input onclick='return validate(this.form, "Logout.asp");'
class="btn_sml" type="submit" value="Logout" name="Logout" title="Logout"
id="Submit3">
</form>
</div>
</body>
</html>


  #2  
Old July 20th, 2005, 05:29 PM
Anne van Kesteren
Guest
 
Posts: n/a
Default Re: Validation Errors:

CJM wrote:[color=blue]
> 1) Line 16, column 195: document type does not allow element "INPUT" here;
> missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV",
> "ADDRESS" start-tag
>
> This occurs for each <input> tag in the form.[/color]
Just what it says. INPUT is an inline element. FORM can only contain
block-level content. Add a div around it and you are fine.[color=blue]
>
> 2) Line 13, column 90: there is no attribute "TARGET"
>
> This is refering to the <form> tag. How do I specifiy the target frame
> without this?[/color]
Using another DOCTYPE (transitional)[color=blue]
>
> 3) Line 22, column 9: end tag for "FORM" which is not finished
>
> This refers to the </form> tag - I assume this is grumbling about an empty
> form (since all other tags within fail validation)[/color]


--
Anne van Kesteren
http://www.annevankesteren.nl/
  #3  
Old July 20th, 2005, 05:29 PM
Steve Pugh
Guest
 
Posts: n/a
Default Re: Validation Errors:

"CJM" <cjmwork@yahoo.co.uk> wrote:

You're using a strict doctype. This causes all the following errors.
[color=blue]
>Tackling the Options page first, I've hit a few validation errors:
>
>1) Line 16, column 195: document type does not allow element "INPUT" here;
>missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV",
>"ADDRESS" start-tag
>
>This occurs for each <input> tag in the form.[/color]

In strict <input> is not allowed as a direct child of <form>.
Use a container like <fieldset> or <div>.

Or switch down to Transitional.
[color=blue]
>2) Line 13, column 90: there is no attribute "TARGET"
>
>This is refering to the <form> tag. How do I specifiy the target frame
>without this?[/color]

You don't. The target attribute, like everything to do with frames,
specific windows, etc. has no place in Strict.

You can either drop the frames, use JavaScript instead, or drop down
to Transitional.
[color=blue]
>3) Line 22, column 9: end tag for "FORM" which is not finished
>
>This refers to the </form> tag - I assume this is grumbling about an empty
>form (since all other tags within fail validation)[/color]

I think that's right.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <steve@pugh.net> <http://steve.pugh.net/>
  #4  
Old July 20th, 2005, 05:29 PM
CJM
Guest
 
Posts: n/a
Default Re: Validation Errors:

Thanks.

Transitional it is then...


"Steve Pugh" <steve@pugh.net> wrote in message
news:ji9fqvg695npga684luofh9o8j40rpk2i0@4ax.com...[color=blue]
> "CJM" <cjmwork@yahoo.co.uk> wrote:
>
> You're using a strict doctype. This causes all the following errors.
>[color=green]
> >Tackling the Options page first, I've hit a few validation errors:
> >
> >1) Line 16, column 195: document type does not allow element "INPUT"[/color][/color]
here;[color=blue][color=green]
> >missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV",
> >"ADDRESS" start-tag
> >
> >This occurs for each <input> tag in the form.[/color]
>
> In strict <input> is not allowed as a direct child of <form>.
> Use a container like <fieldset> or <div>.
>
> Or switch down to Transitional.
>[color=green]
> >2) Line 13, column 90: there is no attribute "TARGET"
> >
> >This is refering to the <form> tag. How do I specifiy the target frame
> >without this?[/color]
>
> You don't. The target attribute, like everything to do with frames,
> specific windows, etc. has no place in Strict.
>
> You can either drop the frames, use JavaScript instead, or drop down
> to Transitional.
>[color=green]
> >3) Line 22, column 9: end tag for "FORM" which is not finished
> >
> >This refers to the </form> tag - I assume this is grumbling about an[/color][/color]
empty[color=blue][color=green]
> >form (since all other tags within fail validation)[/color]
>
> I think that's right.
>
> Steve
>
> --
> "My theories appal you, my heresies outrage you,
> I never answer letters and you don't like my tie." - The Doctor
>
> Steve Pugh <steve@pugh.net> <http://steve.pugh.net/>[/color]


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles