Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2006
    Posts
    6
    Plugin Contributions
    0

    Default Help with javascript validation error

    I've been trying to remedy the errors and warnings appearing when I run a W3C validation on our store site, and I'm having trouble resolving the following warning:

    "character "<" is the first character of a delimiter but occurred as data."

    I've tried replacing the "<" and ">" with "&lt;" and "&gt;" as suggested, but this basically gives me a blank page with the footer only remaining. The error is at the end of a piece of javascript code used for our certificate in the "html_header.php" file. The <script> code is at the bottom of the "html_header.php" file just prior to the "</head>" tag. The code follows - any help is appreciated. ('<\/scr' is the specific offending code)

    <script language="javascript" type="text/javascript">
    var cot_loc0=(window.location.protocol == "https:")? "https://secure.comodo.net/trustlogo/javascript/cot.js" :
    "http://www.trustlogo.com/trustlogo/javascript/cot.js";
    document.writeln('<scr' + 'ipt language="JavaScript" src="'+cot_loc0+'" type="text\/javascript">' + '<\/scr' + 'ipt>');
    </script>

    FYI - the Comodo "trustlogo" displays correctly (floats on all pages) and doesn't seem to be causing any issues with the pages, but comes up as invalid when the page is checked. Also please know that I'm figuring out coding as I go - I'm definitely no expert and would probably be qualified at a "just barely above newbie" level, so please be gentle!

    http://monsterpawn.com

    Thanks in advance!

  2. #2
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,748
    Plugin Contributions
    0

    Default Re: Help with javascript validation error

    I have the code in my file like this and I don't throw any error in the javascript
    Code:
    <script language="javascript" type="text/javascript">
    //<![CDATA[
    var cot_loc0=(window.location.protocol == "https:")? "https://secure.comodo.net/trustlogo/javascript/cot.js" :
    "http://www.trustlogo.com/trustlogo/javascript/cot.js";
    document.writeln('<scr' + 'ipt language="JavaScript" src="'+cot_loc0+'" type="text\/javascript">' + '<\/scr' + 'ipt>');
    //]]>
    </script>
    Mike
    GeekHost - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

  3. #3
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,748
    Plugin Contributions
    0

    Default Re: Help with javascript validation error

    the problem with the trust logo is not the javascript.....its the non-validating html code that they wrote to have the iframe appear. I have already discussed this with comodo and they are supposed to be working on it.


    I think the larger problem here is all of the other errors on your page.....skip over the javascript and move on to the other stuff. You have 6 error and many warnings.
    Mike
    GeekHost - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

  4. #4
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,748
    Plugin Contributions
    0

    Default Re: Help with javascript validation error

    It also appears that you have hard coded all of your sidebox header images instead of calling them in the stylesheet and the line break tags need to be like <br /> not <br>
    Mike
    GeekHost - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

  5. #5
    Join Date
    Nov 2006
    Posts
    6
    Plugin Contributions
    0

    Default Re: Help with javascript validation error

    Thanks for the info. I know there are many errors - in the process of tracking them all down, finishing the <br> issue the first thing tomorrow (trust me, there were a lot more before you saw it!)

    However, I'm surprised to see you mention "many warnings" - when I left the site at around 6 PM CST on Friday, I had whittled it down to only one "warning" - the one posted here (granted, there are still many "errors" to fix). I'm using the Firefox developers toolbar validating the xhtml via W3C. I haven't dug into the CSS validation yet, so maybe that's where you're seeing additional warnings. If I'm totally missing something, any additional info is appreciated.

    Regardless, thanks for the all the info so far - as I said, I'll be back on it tomorrow - actually, later this morning I guess! - and I'm sure I'll have more questions.

    On a side note, this forum has helped tremendously as I've worked up this site - I'm a long time print designer by experience, a very untrained web designer with very basic html knowledge, and, as you've might have guessed, this is my first endeavor with PHP - but with the help of the people on this board and the online Zen Cart help, I've been able to track down almost everything I needed/wanted to do.

    Thanks to all the participants...and they say socialism doesn't work!

  6. #6
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,748
    Plugin Contributions
    0

    Default Re: Help with javascript validation error

    This is from FF with the Tidy plugin
    Code:
    line 72 column 51 - Error: <image> is not recognized!
    line 72 column 51 - Warning: discarding unexpected <image>
    line 87 column 54 - Error: <image> is not recognized!
    line 87 column 54 - Warning: discarding unexpected <image>
    line 93 column 58 - Error: <image> is not recognized!
    line 93 column 58 - Warning: discarding unexpected <image>
    line 123 column 51 - Warning: <img> element not empty or not closed
    line 127 column 1 - Warning: <img> element not empty or not closed
    line 130 column 94 - Warning: <img> element not empty or not closed
    line 133 column 98 - Warning: <img> element not empty or not closed
    line 136 column 97 - Warning: <img> element not empty or not closed
    line 139 column 96 - Warning: <img> element not empty or not closed
    line 142 column 99 - Warning: <img> element not empty or not closed
    line 147 column 134 - Warning: <embed> is not approved by W3C
    line 182 column 54 - Error: <image> is not recognized!
    line 182 column 54 - Warning: discarding unexpected <image>
    line 188 column 176 - Error: <image> is not recognized!
    line 188 column 176 - Warning: discarding unexpected <image>
    line 194 column 175 - Error: <image> is not recognized!
    
    Too many errors. Not all warnings/errors were shown.
    
    6 errors / 29 warnings
    Always clear error first, from top down, will usually clear most of the warning as the error is what is screwing it up in the first place.

    Here are the error in your main stylesheet:
    Code:
    13 	body  	Value Error : margin only 0 can be a length. You must put an unit after your number : 1
    180 	#logoWrapper 	Value Error : height only 0 can be a length. You must put an unit after your number : 765
    201 	#sendSpendWrapper 	Value Error : float center is not a float value : center
    335 	.gvBal 	Value Error : float center is not a float value : center
    after that there are 93 warning for same color/background color....I tend to ignore these as they don't effect anything and are pain
    Last edited by barco57; 24 Mar 2007 at 02:34 PM.
    Mike
    GeekHost - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

 

 

Similar Threads

  1. Replies: 2
    Last Post: 28 Jul 2011, 02:26 PM
  2. Replies: 13
    Last Post: 4 May 2010, 10:47 AM
  3. Form Validation Javascript!
    By voyager in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 23 Oct 2009, 03:29 PM
  4. "Conditions Not Accepted" with Javascript Validation
    By gems14k in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 16 Nov 2006, 11:26 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR