INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Basic code will not validate.

Basic code will not validate.

(OP)
Some basic code but with a number of errors.
What am I missing here?
It works fine without the table code but I am intrigued with what is wrong here.

CODE

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Title</title>
</head>
<body>
<form method='post' action='script.pl'>
<table>
<input type='hidden' name='call' value='resend'>
<tr><td>Your Name</td><td><input type='text' name='CONTACT' value=''></td></tr>
<tr><td>Email Address</td><td><input type='text' name='EMAIL' value=''></td></tr>
<tr><td colspan='2'><input type='submit' NAME='submit' value='Please Email My Log in Details'></td></tr>
</table>
</form>
</body>
</html> 

Keith
www.studiosoft.co.uk

RE: Basic code will not validate.

Hi Keith,
Firefox web developer tool validator results showed no charset specified, so I put one in and then I just placed your hidden input type in a tr in the table and then bingo it validated. Don't know why it was failing though!!

See code below

CODE

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Title</title>
</head>
<body>
<form method='post' action='script.pl'>
<table>
<tr><td><input type='hidden' name='call' value='resend'><tr><td>
<tr><td>Your Name</td><td><input type='text' name='CONTACT' value=''></td></tr>
<tr><td>Email Address</td><td><input type='text' name='EMAIL' value=''></td></tr>
<tr><td colspan='2'><input type='submit' NAME='submit' value='Please Email My Log in Details'></td></tr>
</table>
</form>
</body>
</html> 

Steve

RE: Basic code will not validate.

Hi Keith,
Ooops, minor correction to my code. I didn't close my tr and td tags correctly. Code below has been corrected and it still validates.

After a short Google session it would appear that any content outside of table tags ( tr, td etc ) will not validate as content should appear inside table tags. It still displays in a browser though.

Anyway, hope this helps

CODE

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Title</title>
</head>
<body>
<form method='post' action='script.pl'>
<table>
<tr><td><input type='hidden' name='call' value='resend'></td></tr>
<tr><td>Your Name</td><td><input type='text' name='CONTACT' value=''></td></tr>
<tr><td>Email Address</td><td><input type='text' name='EMAIL' value=''></td></tr>
<tr><td colspan='2'><input type='submit' NAME='submit' value='Please Email My Log in Details'></td></tr>
</table>
</form>
</body>
</html> 

Regards

Steve

RE: Basic code will not validate.

(OP)
Thanks Steve
I think there must be something corrupted in my original file.
Pasting my original code, from the code box above, into a HTML page - does not validate.
The code you returned, even with the charset line removed, does validate.
All is working now thanks.

Keith
www.studiosoft.co.uk

RE: Basic code will not validate.

The main reason your code does not validate is your hidden input.

There can be nothing between <table> tags if its not also contained between <tr> and <td> tags.
i.e. your hidden input is misplaced, and causes the rest of the validation errors.

Remove it, and your code will validate as is.

CODE

<table>
<input type='hidden' name='call' value='resend'>
<tr><td>Your Name</td><td><input type='text' name='CONTACT' value=''></td></tr>
<tr><td>Email Address</td><td><input type='text' name='EMAIL' value=''></td></tr>
<tr><td colspan='2'><input type='submit' NAME='submit' value='Please Email My Log in Details'></td></tr>
</table> 

----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech

RE: Basic code will not validate.

(OP)
Thanks Phil
I never noticed that Datamasher's version enclosed the hidden var in table tags.
The solution is obvious when it is pointed out.

Keith
www.studiosoft.co.uk

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close