Form Validation

  • Thread starter Thread starter sheetrum
  • Start date Start date
S

sheetrum

Could someone take a peek and tell me what I'm missing from this page for
validation to work?
http://www.sacredheartlanc.org/contact22.htm

I have validation woking OK on another page, and I used that one as a
reference. I was being very careful to change all form field names (that did
changed) from the one form to the other.

Thanks
 
sheetrum said:
Could someone take a peek and tell me what I'm missing from this page
for validation to work?
http://www.sacredheartlanc.org/contact22.htm

I have validation woking OK on another page, and I used that one as a
reference. I was being very careful to change all form field names
(that did changed) from the one form to the other.

Thanks

Perhaps thi is a problem

No DOCTYPE found! Attempting validation with HTML 4.01 Transitional.
The DOCTYPE Declaration was not recognized or is missing. This probably
means that the Formal Public Identifier contains a spelling error, or that
the Declaration is not using correct syntax. Validation has been performed
using a default "fallback" Document Type Definition that closely resembles
"HTML 4.01 Transitional", but the document will not be Valid until you have
corrected this problem with the DOCTYPE Declaration.

You should place a DOCTYPE declaration as the very first thing in your HTML
document. For example, for a typical XHTML 1.0 document:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Title</title>
</head>

<body>
<!-- ... body of document ... -->
</body>
</html>
For XML documents, you may also wish to include an "XML Declaration" even
before the DOCTYPE Declaration, but this is not well supported in older
browsers. More information about this can be found in the XHTML 1.0
Recommendation.

The W3C QA Activity maintains a List of Valid Doctypes that you can choose
from, and the WDG maintains a document on "Choosing a DOCTYPE".

Namespace Found in non-XML Document
Namespace "" found, but document type is not XML

See this for full list of errors
http://validator.w3.org/check?uri=h...+automatically)&doctype=Inline&ss=1&verbose=1
The validator seems to be treating this as Strict HTML

None of the errors relate to the form.

Is it XHTML or HTML?
It looks like HTML to me, so the first lines should be
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
Your HTML is missing these lines at the bottom
</body>
</html>

With a valid DOCTYPE, you may get a completely different validation result.
 
The OP is asking about Form validation (JavaScript), not W3C validation
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| sheetrum wrote:
| > Could someone take a peek and tell me what I'm missing from this page
| > for validation to work?
| > http://www.sacredheartlanc.org/contact22.htm
| >
| > I have validation woking OK on another page, and I used that one as a
| > reference. I was being very careful to change all form field names
| > (that did changed) from the one form to the other.
| >
| > Thanks
|
| Perhaps thi is a problem
|
| No DOCTYPE found! Attempting validation with HTML 4.01 Transitional.
| The DOCTYPE Declaration was not recognized or is missing. This probably
| means that the Formal Public Identifier contains a spelling error, or that
| the Declaration is not using correct syntax. Validation has been performed
| using a default "fallback" Document Type Definition that closely resembles
| "HTML 4.01 Transitional", but the document will not be Valid until you have
| corrected this problem with the DOCTYPE Declaration.
|
| You should place a DOCTYPE declaration as the very first thing in your HTML
| document. For example, for a typical XHTML 1.0 document:
|
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
| <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
| <head>
| <title>Title</title>
| </head>
|
| <body>
| <!-- ... body of document ... -->
| </body>
| </html>
| For XML documents, you may also wish to include an "XML Declaration" even
| before the DOCTYPE Declaration, but this is not well supported in older
| browsers. More information about this can be found in the XHTML 1.0
| Recommendation.
|
| The W3C QA Activity maintains a List of Valid Doctypes that you can choose
| from, and the WDG maintains a document on "Choosing a DOCTYPE".
|
| Namespace Found in non-XML Document
| Namespace "" found, but document type is not XML
|
| See this for full list of errors
|
http://validator.w3.org/check?uri=h...+automatically)&doctype=Inline&ss=1&verbose=1
| The validator seems to be treating this as Strict HTML
|
| None of the errors relate to the form.
|
| Is it XHTML or HTML?
| It looks like HTML to me, so the first lines should be
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
| "http://www.w3.org/TR/html4/loose.dtd">
| <html>
| Your HTML is missing these lines at the bottom
| </body>
| </html>
|
| With a valid DOCTYPE, you may get a completely different validation result.
|
|
| --
| Cheers,
| Trevor L.
| Website: http://tandcl.homemail.com.au
|
|
 
Stefan said:
The OP is asking about Form validation (JavaScript), not W3C
validation --

Thanks, Stefan

Interestingly, the W3C validation failed, so it wasn't a complete waste of
my time :-))
 
Yes,

JavaScript validation is what i am looing for.

Anyone notice what's missing?



Stefan B Rusynko said:
The OP is asking about Form validation (JavaScript), not W3C validation
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| sheetrum wrote:
| > Could someone take a peek and tell me what I'm missing from this page
| > for validation to work?
| > http://www.sacredheartlanc.org/contact22.htm
| >
| > I have validation woking OK on another page, and I used that one as a
| > reference. I was being very careful to change all form field names
| > (that did changed) from the one form to the other.
| >
| > Thanks
|
| Perhaps thi is a problem
|
| No DOCTYPE found! Attempting validation with HTML 4.01 Transitional.
| The DOCTYPE Declaration was not recognized or is missing. This probably
| means that the Formal Public Identifier contains a spelling error, or
that
| the Declaration is not using correct syntax. Validation has been
performed
| using a default "fallback" Document Type Definition that closely
resembles
| "HTML 4.01 Transitional", but the document will not be Valid until you
have
| corrected this problem with the DOCTYPE Declaration.
|
| You should place a DOCTYPE declaration as the very first thing in your
HTML
| document. For example, for a typical XHTML 1.0 document:
|
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
| <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
| <head>
| <title>Title</title>
| </head>
|
| <body>
| <!-- ... body of document ... -->
| </body>
| </html>
| For XML documents, you may also wish to include an "XML Declaration"
even
| before the DOCTYPE Declaration, but this is not well supported in older
| browsers. More information about this can be found in the XHTML 1.0
| Recommendation.
|
| The W3C QA Activity maintains a List of Valid Doctypes that you can
choose
| from, and the WDG maintains a document on "Choosing a DOCTYPE".
|
| Namespace Found in non-XML Document
| Namespace "" found, but document type is not XML
|
| See this for full list of errors
|
http://validator.w3.org/check?uri=h...+automatically)&doctype=Inline&ss=1&verbose=1
| The validator seems to be treating this as Strict HTML
|
| None of the errors relate to the form.
|
| Is it XHTML or HTML?
| It looks like HTML to me, so the first lines should be
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
| "http://www.w3.org/TR/html4/loose.dtd">
| <html>
| Your HTML is missing these lines at the bottom
| </body>
| </html>
|
| With a valid DOCTYPE, you may get a completely different validation
result.
|
|
| --
| Cheers,
| Trevor L.
| Website: http://tandcl.homemail.com.au
|
|
 
sheetrum said:
I was looking for javascript validation, not FrontPage validation.

Line 59 char 42 expcted ')'
window.alert("Please enter your "Comments" for the webmaster.");

The " before Comments is treated as a closing quote for the contents of the
alert
The rest of the text therefore cannot be interpreted.

Try window.alert("Please enter your \"Comments\" for the
webmaster.");

The escape char (\) allows the " to be treated as part of the quoted text
 
Back
Top