473,320 Members | 2,109 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

problem validating

mickey0
142 100+
hello, validating this file on w3c I have many error:
Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3.  
  4. <html xmlns="http://www.w3.org/1999/xhtml" >
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  7.  
  8. <script type="text/javascript" src="java.js"></script>
  9.  
  10. <script type="text/javascript">
  11. function myFunc () {
  12.        for (var i=0;i<100;i++) {
  13.             var table = document.getElementById("intro");  
  14.             var row = document.createElement("tr");
  15.             var cell = document.createElement("td");
  16.             var link = document.createElement("a");    
  17.             link.setAttribute("href", "http://www.google.com");
  18.             var linkText = document.createTextNode(" HII ");     
  19.             link.appendChild(linkText);
  20.             cell.appendChild(link);
  21.             row.appendChild(cell);
  22.             table.appendChild(row);        
  23.     }
  24. }   
  25. </script>
  26.  </head>
  27.  <body onload="myFunc()">
  28.     <table style="width: 100%" border="5" >
  29.        <tr><td> GETTS</td> </tr>
  30.         <tbody id="intro"><tr><td></td></tr> </tbody>
  31.     </table>
  32. </body>
  33. </html>
  34.  
Could anyone help me? (
character "<" is the first character of a delimiter but occurred as data.
end tag for "head" which is not finished.
.....
and others...)
EDIT: is docType ok?
Jan 31 '08 #1
1 1642
harshmaul
490 Expert 256MB
a few things missing.

Heres the full code...

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3.  
  4. <html xmlns="http://www.w3.org/1999/xhtml" >
  5. <head>
  6. <title>hello world</title>
  7. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  8.  
  9. <script type="text/javascript" src="java.js"></script>
  10.  
  11. <script type="text/javascript">
  12. <!--
  13. function myFunc() {
  14.        for (var i=0;i < 100;i++) {
  15.             var table = document.getElementById("intro");  
  16.             var row = document.createElement("tr");
  17.             var cell = document.createElement("td");
  18.             var link = document.createElement("a");    
  19.             link.setAttribute("href", "http://www.google.com");
  20.             var linkText = document.createTextNode(" HII ");     
  21.             link.appendChild(linkText);
  22.             cell.appendChild(link);
  23.             row.appendChild(cell);
  24.             table.appendChild(row);        
  25.     }
  26. }
  27. -->
  28. </script>
  29.  </head>
  30.  <body onload="myFunc()">
  31.     <table style="width: 100%" border="5" >
  32.        <thead><tr><td> GETTS</td> </tr></thead>
  33.         <tbody id="intro"><tr><td></td></tr> </tbody>
  34.     </table>
  35. </body>
  36. </html>
firstly you need a title in the head tag
you need to put the tables head bit in a thead tag
finally use html comments around you javascript.

hope that helped
Jan 31 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: johkar | last post by:
When the output method is set to xml, even though I have CDATA around my JavaScript, the operaters of && and < are converted to XML character entities which causes errors in my JavaScript. I know...
2
by: Tim Frawley | last post by:
Source code attached indicates my problem with validation and a button bar save button. Fill the Textbox with some text then tab off the control. The message box will display the text in the...
0
by: Joe | last post by:
Hi For a while now I have been finding postings of problems with the validating event not firing on controls properly. I too had this problem. The event would fire when clicking on another...
2
by: Chris Dunaway | last post by:
I have a form with a textbox and numerous panels, buttons and other controls. I have handled the textbox Validating and Validated events. The textbox will hold a filename. In the validating...
0
by: Gary Shell | last post by:
I am experiencing some strange behavior between a UserControl's validating event and a treeview control. Initially, I thought it was related to an issue in the Knowledgebase article 810852...
12
by: steve_marjoribanks | last post by:
I'm fairly new to XML and schemas and I'm trying to work out why a schema I've been given keeps throwing up validation errors in XMLSpy. The section of code with the problem is: ...
4
by: easoftware | last post by:
I am using VS .Net 2003 and VB. I have an app with one parent and two Mdi child forms. I need to validate data in the Mdi form. The Form.Validating event works when I try to close a Mdi form,...
6
by: Ryan | last post by:
I have a windows form that I want to force validation on controls (text boxes) when the user clicks a "Save" button. The only way I've found to do this is to cycle through every control and call...
1
by: =?Utf-8?B?bGpsZXZlbmQy?= | last post by:
I've noticed that controls do not raise a Validating event if they are contained in a ToolStripDropDown via a ToolStripControlHost item. Please run the following sample and follow the instructions...
8
by: Peted | last post by:
I have an amazing problem which i think i have no hope of solving Im working with a c# dot net module that is hosted by and runs under a delphi form envrioment. Dont ask me how this insanity has...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.