Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / I need some help! I think I broke something!

I need some help! I think I broke something!

Views: 1,073

Results 1 to 3 of 3
23 Jan 2014, 4:11 PM
#1
dannyvarley avatar

dannyvarley

Zen Follower

Join Date:
Dec 2011
Posts:
287
Plugin Contributions:
0

I need some help! I think I broke something!

Hi Everyone,

my page at http://kitchenwarehouseltd.com/ displays fine but when you run it through the validator you get 82 errors, these all seem to be because it is reading the javascript as code. This makes me think that something is nested improperly but I can see it myself. I am driving myself insane trying to figure it out.

I will love you forever whoever can help me!

24 Jan 2014, 5:01 AM
#2
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: I need some help! I think I broke something!

Your "template" is telling the browser it conforms to XHTML Transitional. When you use inline javascript you must add appropriate tags to tell the borwser (and validation engine) the content should be treated as character data (instead of parsed as structured data).

<script type="text/javascript">
//<![CDATA[
	/* Add your javascript here inside the character data block */
//]]>
</script>

Some other things you "may" wish to consider:

  • I see more than one "base" element in the "head". This should be corrected.
  • Multiple elements with the same "id" attribute (some are also empty). This should be corrected.
  • All elements need to be closed. This also applies to "br" elements. For XHTML they should be "<br />".
  • Images should have "alt" tags specified.
  • For jQuery plugins (like slimbox) why are you using inline javascript (increasing the page size / download time) instead of using an external file (which can leverage caching and reduce the overall amount of data required when viewing a second page or coming back to the site)?
24 Jan 2014, 10:05 AM
#3
dannyvarley avatar

dannyvarley

Zen Follower

Join Date:
Dec 2011
Posts:
287
Plugin Contributions:
0

Re: I need some help! I think I broke something!

Perfect!

Thanks for all the other tips too, Im not sure why slimbox is loaded as inline, I think that's to do with the zen_lightbox plugin.

Im gunna work through all of it and see if I can get it sorted.

THANKYOU