HTML - Xhtml 1.1 Validation Problem, Javascript Causes Problems
Hi.
My entire site is 100% XHTML1.1. Except for some new code I added which causes errors in validation. the code is HTML Code: <a href="http://babelfish.altavista.com/babelfish/" onclick="window.open('http://babelfish.altavista.com/babelfish/trurl_pagecontent?lp=en_it&url='+encodeURIComponent(location.href));return false;" title="Translate to Italian"><img title="Italian" src="http://geekimo.com/licons/it.png" alt="Italian" /></a> I understand maybe CDATA islands can help with this? or making it external? but I have no idea how to do that with it having html code in there too.. I don't know if you can surround it in CDATA tags. There are other lines of code too, exactly the same except have different languages. Any help would be awesome! Similar TutorialsOk, so, I have a copy of Macromedia Fireworks. I used it to create a rollover navigation bar for my site (see link at the end of this post). Fireworks exports the file as HTML, and not XHTML, so the JavaScript in the code doesn't validate. The W3C Validator has found 4 problems (there was around 70,but i fixed those all up, because they were just img tag issues): If anyone knows JavaScript and can fix these (or at least help me fix them), please post! Link to the page in question: http://ericsartor.freehostia.com/new-template/ Just view the source to see what I'm talking about. I have been creating a website with Javascript. When the user rolls over an image button, the button will glow and when the user presses on the button it will change to and image of the button being pressed. This program has been working with at least 6 buttons but the current button i'm working on stops doing what the previous buttons did and I would like to know why. I copied the codes exactly the same as the previous buttons, changed the image picture and provided the correct links to each image but somehow it just stops working. Thank you for your help (: -=Example of the codes=- Button 1: <a href="'test2.htm" onMouseDown="pressButton('chatBtn');return true;" onMouseOver="overButton('chatBtn');return true;" onMouseOut="releaseButton('chatBtn');return true;"><img name=chatBtn src="images/chat.png" border="0" alt="Chat" /></a> Button 2: <a href='test.htm' onMouseDown="pressButton('backBtn');return true;" onMouseUp="overButton('backBtn');return true;" onMouseOut="releaseButton('backBtn');return true;"><img name=backBtn src="images/back.png" border="0" alt="Back" /></a> Javascript code: // Preloading Images if (document.images) { chatBtn_up = new Image(); chatBtn_up.src="images/chat.png"; chatBtn_down= new Image(); chatBtn_down.src="images/chatPress.png"; chatBtn_hover = new Image(); chatBtn_hover.src="images/chatHover.png"; backBtn_up = new Image(); backBtn_up.src="images/back.png"; backBtn_down= new Image(); backBtn_down.src="images/backPress.png"; backBtn_hover = new Image(); backBtn_hover.src="images/backHover.png"; } // Event Handlers for button function pressButton(btName) { if (document.images) eval('document.'+btName+'.src='+btName+'_down.src'); } function releaseButton(btName) { if(document.images) eval('document.'+btName+'.src='+btName+'_up.src'); } function overButton(btName) { if (document.images) eval('document.'+btName+'.src='+btName+'_hover.src'); } Hi there I use an iframe on a page and it doesn't validate, has anyone any idea why please ? Code: <iframe src="http://www.website.com" width="500" height="400"> </iframe> Thanks Gary Seem to be getting W3C errors on my Joomla based website. At a loss on how to make it compliant. The address is www.mph-uk.com and if you click the W3C checker on the right hand side, it should bring up three errors. Any advice is appreciated. Some of the items are coming from templates and modules. Hello, I made a site and it has XHTML Validation Errors. http://validator.w3.org/check?uri=ht....ens.org.in%2F Here is the link. Site is http://www.new.ens.org.in Can you please help me solve those errors? Hi I am trying to make this pop up effect pass the W3C validation test This is the page in question: http://www.newmedia.lincoln.ac.uk/je...sts/popup.html This is a direct link to the W3C XHTML Validation results: http://validator.w3.org/check?verbos...s%2Fpopup.html Please can someone help? a fragment of the code is shown below, <form id="frmmain" name="frmmain" method="post" action="index.php?page=login"> <!--<form id="srch" name="srch" onsubmit="return blockSubmit();">--> <td valign="top" style="padding:4px;text-align:center;height:50px;margin:0 auto;"> <input style="height:20px;background:none;color:#fff;border:1px solid #fff;width:160px;" type="text" value="<?php echo 'Enter WinkedAt code here.';?>" name="wa_id" id="wa_id" onclick="javascript:document.frmmain.wa_id.value=''" onmouseover="return onMouseOver2('You must <a href=index.php?page=login>Login</a> first to add WinkedAt code or <a href=index.php?page=Signup>Sign-up</a> for a free new account.');" onmouseout="onMouseOut2();" /> </td> <td valign="top"> <input type="hidden" id="my_id" name="my_id" value="<?php echo $my_id;?>"/> <input type="hidden" name="error" value="<?php echo $error;?>"/> <input type="hidden" name="msg" value="<?php echo $msg;?>"/> <input style="border:none;" type="image" src="<?php echo _DEFAULT_TEMPLATE_PATH;?>/images/goarrow.png"/> </td> </form> but when i validate it, it prompts errors such as these --document type does not allow element "td" here --Attribute "name" exists, but can not be used for this element. i tried putting divs but still the error prompts..what did i overlook? I'm using Eclipse as my IDE, and getting a warning from it's XHTML validator saying: Invalid location of tag (br). The code is as follows: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>Animation Master</title> </head> <body style="font-family: sans-serif"> <h1>Testing</h1> <br /> <br /> <br /> <p>Blah blah</p> </body> </html> It happens at each <br /> tag, so I'm getting the warning three times. Why is this? I am trying to make my contact page pass the W3C validation test. I have tried putting the form names (your name, your email and subject) in a p class with a defined font family and size because I think this is what W3C is telling me what to do but I still get lots of errors.. This is my form: HTML Code: <form method="post" action="contact.php">your name:<br /> <input type="text" name="name" size="19"><br />your email:<br /> <input type="text" name="email" size="19"><br />subject:<br /> <textarea rows="5" name="message" cols="30"></textarea> <br /> <input type="submit" value="submit" name="submit"> </form> Please can someone shed some light onto this? I am trying to validate but I am getting 24 errors, I fixed some and now down to 14, this error I am dealing with says: # Error Line 3, Column 68: end tag for "html" which is not finished <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"/> Most likely, you nested tags and closed them in the wrong order. For example <p><em>...</p> is not acceptable, as <em> must be closed before <p>. Acceptable nesting is: <p><em>...</em></p> Another possibility is that you used an element which requires a child element that you did not include. Hence the parent element is "not finished", not complete. For instance, in HTML the <head> element must contain a <title> child element, lists require appropriate list items (<ul> and <ol> require <li>; <dl> requires <dt> and <dd>), and so on. This my code: Quote: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"/> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>My Trip Around the USA on a Segway</title> </head> <body> what's wrong here please? Hi all, I've been asked to develop a tool using HTML and JavaScript to target two numbers in a 19 digit combination. The numbers I need to target are in location 8 & 9 (#######89##########) and need to yield one of two responses dependant if the number is less than or equal to what has been entered. So if number less than or equal to 12 I figure I can use layers to hide and reveal the responses and using JavaScript or HTML to target and make the correct layer visible after the complete number has been entered I'm at a loss on how to do this and where to start with my code to make this possible. If anyone can shed some light on what this type of feature is called so I can research it or if you can help me with some code or advice I'd be grateful Thanks hi, i went to validate my page, and it failed. the problem is i cant figure out how to fix the problems. the page is located he http://shanedizzle.com/capecollection/contactus.php here is the validation errors: http://validator.w3.org/check?uri=ht...Fcontactus.php Hi I'm new to this site and I'm having trouble trying to validate my page, I keep getting multiple errors and I'm out of ideas...can somebody help please. Thanks I keep getting these sort of errors: Line 37, Column 9: end tag for element "br" which is not open <tr></br> Line 27, Column 5: XML Parsing Error: Opening and ending tag mismatch: body line 16 and br </br> Line 37, Column 9: XML Parsing Error: Opening and ending tag mismatch: tr line 37 and br <tr></br> Line 54, Column 18: XML Parsing Error: Opening and ending tag mismatch: div line 38 and td </div> </td></tr> HTML Code: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>Megan Fox</title> <meta name="Author" content="Jean Paras" /> <meta name="Keywords" content="Megan Fox, Jennifer's Body, Article" /> <meta name="Description" content="A website for my courswork which is based on a Megan Fox article" /> <link href="mainstyle.css" rel="stylesheet" type="text/css"/> <style type="text/css"> </style> </head> <body> <table border= "15" width = "800" > <tr><td><div class="navigation"> <a href="index.html">MAIN</a> | <a href="meganfox.html">MEGAN FOX</a> | <a href="morefox.html">MORE ON FOX</a> | <a href="gallery.html">GALLERY</a> | <a href="links.html">USEFUL LINKS</a> | </div> </td></tr> </table></br> <table border= "15" width = "800" ><tr> <td><h1>MEGAN FOX</h1></td> </tr><tr> <td><a href="meganfox.html"><img src="megan-fox.jpg" alt="Go To Article" /></a> </td></tr> </table> <table border= "15" width = "800" > <tr></br> <td><div class="navigation"> <a href="index.html">MAIN</a> | <a href="meganfox.html">MEGAN FOX</a> | <a href="morefox.html">MORE ON FOX</a> | <a href="gallery.html">GALLERY</a> | <a href="links.html">USEFUL LINKS</a> | <div id="footer"> <p id="footer-copyright"> ©2009. All Rights Reserved. <br id="footer-neado"/> Article/Images Provided By: <a href="http://www.totalfilm.com/">Total Film Magazine</a><br /> <a href="http://jigsaw.w3.org/css-validator/check/referer"> <img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS!" /></a></p> </div></td></tr> </table> </body> </html> Hello I have this weird problem with the following simple code HTML Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml' dir="ltr"> <head> <link rel="stylesheet" type="text/css" href="css/style.css"> <script src="includes/js/general.js" type="text/javascript"></script> <script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script> </head> Fire fox and chrome thinks that everything is fine, On internet explorer the stylesheet is not working When I take off the DOCTYPE it works in explorer as well what is my problem ? Thanks Lior This stuff in red seems to be sorted now, but I still have the problem with my php page [I've been developing a portfolio which is viewable at timdonaldson.com . I started making in with a HTML page, but to get the thumbnails to pop up like they do I had to transfer it into an xHTML page. I did this but blue aspects that I had styled went pear shaped and I'm not sure where I went wrong. There are horizontal lines made from 1px high div tags that don't show at all and small italic text that should be blue shows up black. Can anyone lend me some ideas on how to fix this? A standard HTML version of the page can be seen at timdonaldson.com/index2.html. I have a couple of other problems to... In the thumbnail gallery, some images don't link in OSX firefox, they don't have a problem in safari though. the 4th image from the left on the top row is like this.] And when you write in the contact form and send me an email, the php sends you to a thank you page, the text on this page doesn't want to be styled no matter what, I can manage to put it into a div container and centre it but that is about it. changing fonts or sizes with css doesn't do anything. I cant get my head around these couple of problems. Any help would be greatly appreciated! My web site www.wayneactorscommunitytheatre.org is having a problem with the navigation on some computers. Dong a mouse over on the header brings up a drop down list for navigation. Doing a mouse over these brings up others. On some computers this doesn't work and users are unable to connect to the lists that come up. It works great on a couple of system I have but two users have complained to me that on their XP internet Explorer it doesn't work. Anyone have any suggestion to how I can fix this? The xtml and css pages verify and I am at a loss as to what the problem is. I've reduced the errors down to two but I'm stuck on fixing these final connected errors relating to the form apparently not being open, but it is! Could someone please see below and tell me what they think? http://validator.w3.org/check?uri=ht...alidator%2F1.2 Thank you. Hey all. I'm having a problem with my website's image links. For some reason there are orange bars around all of the images that are in link tags, and when you click on them they turn purple. They're very tacky and I have no idea why they're there. Here's my website's URL: www.populous3.co.nr Here's the code for one of the pictures: Code: <a href="images.htm"><img src="/images/images.jpg" /></a> Any help will be appreciated! Thanks, Suleiman |