Jump to content

Recommended Posts

Posted

So, I'm jumping into the XHTML bandwagon and editing my html pages accordingly. I'm trying to validate one page that includes a php form using W3C Validator and it gives me the following error:

Sorry, I am unable to validate this document because its content type is application/octet-stream, which is not currently supported by this service.

 

here's the code for the actual page in xhtml format (i think?) edited for clarity:

><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>!!blue's portfolio site</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="description" content="web designer who works with HTML, Flash, CSS and more; use the form to send me an email." />
<meta name="keywords" content="Zulema Ortiz; !!blue; web design; HTML; Flash" />
<meta name="rating" content="general" />
<meta name="copyright" content="Copyright 2003 - Zulema Ortiz" />
<meta name="revisit-after" content="1 week" />
<meta name="expires" content="Fri, 31 Dec 2003 00:00:01 GMT" />
<meta name="distribution" content="global" />
<meta name="robots" content="index,nofollow" />
<meta http-equiv="imagetoolbar" content="no" />
<link href="display.css" rel="stylesheet" title="colors" type="text/css" />
<script language="JavaScript" type="text/JavaScript" src="swap.js">
</script>
</head>
<body onload="MM_preloadImages('img/des_f2.gif')">
<table border="0" cellpadding="0" cellspacing="0" width="750" summary="web designer who works with HTML, Flash, CSS and more; use the form to send me an email.">
<tr>
<td colspan="9" align="left" valign="top" class="bgText">
<!--START: main content cell-->
<br />
 <b>Zulema Ortiz</b> <br />
<p>e-mail: 
<script type="text/javascript" language="JavaScript">
//<![CDATA[
long-ish code here removed for clarity
//]]>
</script>

<br />
 resumé: <a href="resume.pdf">pdf format</a>
| <a href="resume.txt">text format</a><br />
</p>

<table width="450" cellpadding="0" cellspacing="0" border="0" class="links" summary="contact me using this form">
 <tr>
 <td colspan="2">
 <?php
 $to = "zulema_ortiz@zoblue.com";
 $from_header = "From: $Name <$Email>";
 if($Email != "" || $Email == "^[_\\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\\.)+[a-z]{2,3}$") {
	 mail($to,"Subject","\n$Name\n$Email\n\nComments...\n$Message\n",$from_header);
	 print ("<i>Your note has been sent!    Send another if you like!</i><br />");
 }
 else { 
	 echo "<i>Send me a note!</i><br />";
 }
 ?>
 </td>
 <form method="post" action="<? echo ($PHP_SELF); ?>">
 <tr align="left">
	 <td width="100" align="left" valign="top"><p>Name:</p>
	 </td>
	 <td valign="middle"><input type="text" name="Name" size="30" maxlength="30" /></td>
 </tr>
 <tr align="left">
	 <td align="left" valign="top"><p>E-mail:</p></td>
	 <td valign="middle"><input type="text" name="Email" maxlength="30" size="30" /></td>
 </tr>
 <tr align="left" valign="top">
	 <td align="left" valign="top"><p>Message:</p></td>
	 <td valign="top"><textarea name="Message" rows="5" cols="30"></textarea></td>
 </tr>                 
 <tr align="center" valign="top">
	 <td><br />
	 <input type="submit" name="submit" value="Send" /><br />
	 <br />
	 </td>
	 <td><br />
	 <input type="reset" name="reset" value="Clear" /><br />
	 </td>
 </tr>
 </form>
  </table>
<!--END: main content cell-->
</td>
<td rowspan="3"><img name="face1r3_c12" src="img/face1r3_c12.gif" width="75" height="504" border="0" alt="" /></td>
<td><img src="img/spacer.gif" width="1" height="418" border="0" alt="" /></td>
</tr>

<tr>
<td colspan="9"><img name="face1r4_c3" src="img/face1r4_c3.gif" width="616" height="36" border="0" alt="" /></td>
<td><img src="img/spacer.gif" width="1" height="36" border="0" alt="" /></td>
</tr>

<tr>
<td><img name="face1r5_c1" src="img/face1r5_c1.gif" width="58" height="50" border="0" alt="" /></td>
<td colspan="10" align="left" valign="bottom" class="bar">
<script type="text/javascript" language="JavaScript">doTime();    
</script>
<span class="p"><a href="index.htm">home</a> | <a
href="des.htm">design</a> | <a href="art.htm">art</a> | <a
href="wallp.htm">wallpaper</a> | contact | <a
href="http://zoblue.com/flash/index.htm">flash site</a></span>
</td>
<td><img src="img/spacer.gif" width="1" height="50" border="0" alt="" /></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

Can anyone give me any ideas as to what might be wrong? I'm pretty new to the whole XHTML thing and I think having the PHP form inside the code is what's throwing the validator off. But I don't know why it's giving me the "application/octet-stream" error.

 

help!

!!blue

Posted

Hi blue.

 

Try changing the line

 

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />

 

into

 

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

 

The difference is the upper/lower-case ISO/iso.

Posted

 

really :lol: ? hold on.... * switches windows and tries it *

 

ok, that worked! no I got my 'real' errors, e.g.:

Line 121, column 30: character "<" is the first character of a delimiter but occurred as data

    <form method="post" action="<? echo ($PHP_SELF); ?>">

final question: should I change the php code thingies '<' '>' to < and >? or would that fark up the php code?

 

thanks! :lol:

!!blue

Posted

When you are doing the validating are you uploading the file from your hard drive or give the validator the URL of the page online?

 

 

You cant validate the page until after it has been parsed.

Posted (edited)

 

Oh! that might just be it! I was uploading via the hard drive; I will try it. * uploads file to site & validates the URL *

 

Hmm.. still states the page is invalid, "the doctype does not allow the form here". I'm going to move the form tag outside the table instead of inbetween. :lol:

 

Thanks everyone! :lol:

 

!!blue

 

update: yay! it's valid transitional XHTML. I don't think I'm ready for Strict XTHML though...

Edited by !!blue
Posted

Glad you made it :P

 

About the Strict XHTML, give it a try. You'll probably have most problems with tables and invalid attributes, which you can replace by CSS.

IMHO, it's a great learning experience, because you really must write correct code.

Posted

 

thanks for the support! abt strict xhtml: yeah, it's the tables. I'm getting into doing tableless design recently. Slowly but surely :dance:

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...