473,325 Members | 2,805 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,325 software developers and data experts.

Help me validate XHTML 1.0 Strict!

RedSon
5,000 Expert 4TB
Hi all,

I am working on my site (http://loweparkercorp.com/transportest.html) but it doesn't validate properly (http://validator.w3.org/check?uri=ht...D0.7,*;q%3D0.3)

I don't know enough about forms and the errors it's talking about to make a fix. Can some of you more experienced folks take a look and let me know what you think?

Thanks!
Jun 10 '09 #1
6 2206
hsriat
1,654 Expert 1GB
Expand|Select|Wrap|Line Numbers
  1. <!-- START ZEBRATRACKS FORM -->
  2. <form action="#" method="post" id="zebra">
  3. <table width="100%" cellspacing="2" cellpadding="2" border="0">
  4. <tr>
  5.    <td><div class="field1">First Name:</div></td>
  6.    <td><input type="text" 
  7.    name="fname" size="20" maxlength="50" 
  8.    style="font-family:verdana,arial; 
  9.    font-size:11px; width:90px" /></td>
  10. </tr>
  11. <tr>
  12.    <td><div class="field1">Last Name:</div></td>
  13.    <td><input type="text" 
  14.    name="lname" size="20" maxlength="50" 
  15.    style="font-family:verdana,arial; 
  16.    font-size:11px; width:90px" /></td>
  17. </tr>
  18. <tr>
  19.  
  20.    <td><div class="field1">Email:</div></td>
  21.    <td><input type="text" name="email" 
  22.    size="20" maxlength="50" 
  23.    style="font-family:verdana,arial; 
  24.    font-size:11px; width:90px" /></td>
  25. </tr>
  26. <tr>
  27.    <td>&nbsp;</td>
  28.    <td><input type="button" value="Submit" name="Submit" 
  29.    onclick="zebraValidator(this.form);" 
  30.    style="font-family:verdana,arial; 
  31.    font-size:12px; width:65px" /><input 
  32.    type="hidden" name="list_idno" value="5555610" /></td>
  33. </tr>
  34. </table>
  35. </form>
  36. <!-- END ZEBRATRACKS FORM -->
Add style div.field1 {text-align:right;font-family:verdana,arial;font-size:12px} to existing style sheet or separately.

And instead of referring form by name in JavaScript (if you are doing that), refer it by id or tagName.
Jun 10 '09 #2
RedSon
5,000 Expert 4TB
What do you mean refer to it by ID or tagName instead of name. Do I have to change the form further to add IDs or tagNames?
Jun 10 '09 #3
RedSon
5,000 Expert 4TB
So that fixed my html issues, but now my javascript is broken.

How do i fix that?
Jun 10 '09 #4
hsriat
1,654 Expert 1GB
What is the problem with JavaScript? Can you explain a bit what you are trying to achieve?

Don't worry about referring the form, you are not doing that anywhere in the JavaScript. So its OK.
Jun 11 '09 #5
RedSon
5,000 Expert 4TB
I dont think it has the proper first name last name and email when it submits them to the newsletter list.

Can you see the js?
Jun 11 '09 #6
hsriat
1,654 Expert 1GB
Expand|Select|Wrap|Line Numbers
  1. function zebraValidator(f){
  2.  var n, e, zebraW, s, t, lid;
  3.  fn = f.fname.value;
  4.  ln = f.lname.value;
  5.  e = f.email.value;
  6.  lid = f.list_idno.value;
  7.  s = "http://app.simplycast.com/";
  8.  s += "external_form_handler.asp";
  9.  s += "?list_idno="+lid+"&fname="+fn+"&lname="+ln+"&email="+e;
  10.  t = "scrollbars=no,screenX=10,left=10,screenY=5";
  11.  t += ",top=5,width=260,height=140,resizable=no";
  12.  zebraW = window.open(s,"zebraW",t);
  13.  zebraW.focus();
  14.  f.reset();
  15. }
I don't see any sort of validation here, so how is it supposed to validate first name, last name and email?

And just a little change:
Change this:
Expand|Select|Wrap|Line Numbers
  1. <input type="button" value="Submit" name="Submit" onclick="zebraValidator(this.form);" style="font-family:verdana,arial;font-size:12px; width:65px" />
To this:
Expand|Select|Wrap|Line Numbers
  1. <input type="button" value="Submit" name="Submit" style="font-family:verdana,arial;font-size:12px; width:65px" />
And this:
Expand|Select|Wrap|Line Numbers
  1. <form action="#" method="post" id="zebra">
To this:
Expand|Select|Wrap|Line Numbers
  1. <form action="#" method="post" id="zebra" onsubmit="zebraValidator(this);return false;">
Then add some validation feature in the validator function.
Jun 11 '09 #7

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

Similar topics

22
by: Haines Brown | last post by:
I have a document with a set of internal links such as: <a name="Z1"></a>... <a name="Z2"></a>... The W3C validator objects to the first instance of the name attribute: There is no attribute...
6
by: mike | last post by:
Hello, After trying to validate this page for a couple of days now I was wondering if someone might be able to help me out. Below is a list of snippets where I am having the errors. 1. Line 334,...
16
by: rik | last post by:
I was flicking through a PHP book (one of the teach in 24 hour ones) and I came across something I had never seen before in PHP. It was a method of printing out without using the print method, it...
9
by: Matthias Kaeppler | last post by:
Hi, I'm using phpWebSite to build my website and I want it to be standard conforming. However, the CSS validator always outputs an error: "Please, validate your XML document first! The...
1
by: Simon Barnett | last post by:
Hi, RE: Converting pages including ASP pages for XHTML My question relates to ASP not ASP.NET - I can't find a newsgroup for ASP and hoped it was still relevant in ASP.NET - sorry if it's not....
5
by: Damian Burrin | last post by:
Hi guy's i'm v new to this and probably getting this wrapped right round my head, but why can't i use something like wc3 to validate this. -----------------XML--------------------------- <?xml...
9
by: Randy | last post by:
Hi all, I've been working on a simple two column layout for a site, but according to browsershots.org, my desing is not showing up correctly in Win/IE 5.01, 5.5 & 6 ! Please see details here:...
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
3
by: bdbeames | last post by:
Ok I have a form validation problem that I need one of you javascript ninja s to help me with. The following is a form with the javascript that I have used for the last year or two to validate. ...
5
by: Abhishek | last post by:
Hi this is my another validator in javascript to validate the Phone Number :-) <script language='javascript'> function funcCheckPhoneNumber(ctrtxtMobile,e){ if(window.event){ var strkeyIE =...
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...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
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...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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: 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
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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.