472,952 Members | 2,325 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,952 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 1624
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: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

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.