This Post
  • HOME PAGE
  • ABOUT
  • ARCHIVES
  • SITEMAP
 
« EntreCard - A New Start… Or End? The March $100 winner, a problem and a rant »
 
15
Apr

Valid XHTML For The EntreCard Widget

by admin

xhtml validation
I have already written about the importance of having your pages validated. Basically, valid code ensure that the page will render properly on different browsers and devices and it helps the search engines scan the page.

One thing that has bugged me since joining EntreCard is that the widget does not produce valid code, instead there are three warnings or errors produced. I have been meaning to get around to it, but other things always cropped up. Well, today I had a spare ten minutes to have a look at it and I fixed it.

Here is the code for the widget, I have highlighted the error causing part in red:

<script src="http://entrecard.s3.amazonaws.com/widget.js?user_id=xxx&
type=standard_127" type="text/javascript" id="ecard_widget">
</script>

This is for the 127 pixel wide widget, but the code is essentially the same for all versions of the widget, I have also replaced my id as ‘xxx’. The part that causes the xhtml errors is the ampersand (&). All that needs to be done is to replace it with &amp;

<script src="http://entrecard.s3.amazonaws.com/widget.js?user_id=xxx&amp;
type=standard_127" type="text/javascript" id="ecard_widget">
</script>

Just to make sure, I first did this on my local server and then validated the code, no problems. Then I uploaded the changes this morning. I have had no calls or emails about problems clicking on the widget and I have seen clicks coming through normally all day.

Related posts:
  1. Is Your Page Valid?
  2. SplashPress Adopts The ScratchBack Widget
  3. How to Style Your Comments - Part 2
Subscribe to RSS feed
stumble me

Tags: entrecard, widget, xhtml
Category wordpress | Print This Post Print This Post |

There are 14 Comments

  1. Finally a cool Entrecard tip that helps the community! Did you submit this to phirate for an opinion on making this change for everyone by default?

    Scribbled by Turnip on 16/04/08 at 4:21 am
  2. Arh. You were reading my mind about this. I have been removing all items that don’t validate, now that all remains is my ENTIRE site. :)

    So will give this a shot later, hopefully it will work.

    This whole validating business is a constant issue for me. WIth my lack of serious skill and experience at coding, everytime I make updates, tweaks, I end up with dozens of errors.

    But although it is initially VERY frustrating, I am learning by seeing these errors and correcting them.

    But I just fear that my site is never 100% at any one time and feel that people don’t keep on top of it are not taken seriously.

    Thanks for this tip.

    Scribbled by Graham Smith on 16/04/08 at 9:20 am
  3. I will tell you this, if you’re using the Vladimir Prelovac plugin “Entrecard me!”, it will not save the code with the & in it –it strips it out and leaves the & as it was before.

    ê¿ê

    Scribbled by Margaret on 16/04/08 at 9:34 am
  4. @Turnip: Not yet.

    @Graham: The “secret” is to fix the first few errors and then revalidate. And yes, it is frustrating at times, but that’s part of the fun ;)

    @Margaret: I have just downloaded his latest version, Dec 5th, I pasted in the modified code on the Settings page and then hit Update. The mod looks like it was stripped out. I then viewed source of web page and it was NOT stripped and the page validated correctly. This was both as a widget and as a plugin.

    Scribbled by Colin King on 16/04/08 at 1:40 pm
  5. Great post and I agree with Turnip….an Entrecard post of value!

    A new vistor here and I am really impressed with the quality of info on your site. I’ll be a regular! Thanks

    Scribbled by Neal on 16/04/08 at 3:32 pm
  6. If you’re using an HTML editor such as BBEdit, CODA or Dreamweaver they all have code validators in them that will make the process easier. It’s key to make sure your code is valid XHTML, because I’m sure one day that browsers will be more strict in how they display your code.

    Another good idea is to make your CSS valid as well.

    BTW…I just noticed my ED code is invalid. Time to run to the editor. LOL

    Scribbled by Bryan on 16/04/08 at 3:45 pm
  7. @Neal: thx guy.

    @Bryan: Did you check the link at the start of the post? I prefer not to use the inbuilt validators as they usually offer limited help. The Web Developers ToolBar uses the W3C’s validator. Also it’s important NOW to validate both xhtml and css because pages are not just viewed in browsers on computer screens anymore, there are other devices that will not render unless the code is good.

    Scribbled by Colin King on 16/04/08 at 6:30 pm
  8. Thanks for checking that out CK! I never thought to look at the source code — just kept looking at what was in that dratted plug in (and I’m using the latest version of it, too) and not seeing my changes kept.

    Scribbled by Margaret on 16/04/08 at 10:25 pm
  9. I did see the link at the start of the post. However, since I commented while I was at work I didn’t get a chance to read it thoroughly. I also use the Web Developers Toolbar, and I love it! Since it’s a free download, it’s definitely worth using. Honestly, I’ve never used that validator though. I see what you mean about the level of help it offers in locating the error.

    Thanks for helping me see the light. :)

    Scribbled by Bryan on 18/04/08 at 2:02 am
  10. OK, I’ll have to save this post for when I finish my Greek studies :-)

    I’ll definitely look into this stuff tho, even though I’m as tech challenged as they come.

    Scribbled by Dennis Edell on 18/04/08 at 1:05 pm
  11. Cool Colin, thanks a lot. I’ve been meaning to get back to going through my error list and now you’ve given me a starting point. Thanks again! :)

    Scribbled by JoLynn Braley on 18/04/08 at 6:02 pm
  12. Colin, where are you? I am starting to get worried. Have you been sick? Hope you get back soon.

    Scribbled by ettarose on 21/04/08 at 6:09 am
  13. @Margaret: No problem, it fooled me at first.

    @Bryan: Reading my reply, it looks like I was nagging you, sorry, that wasn’t the intention, esp. when I write I come across as a bit dogmatic/overbearing :(

    @Dennis: Don’t worry, this fix is just adding a few characters :)

    @JoLynn: Just fix a couple of errors at a time, the list will soon shrink.

    @EttaRose: My PC died… see my latest post. I’m hobbling around on a Mac for now.

    Scribbled by Colin King on 21/04/08 at 3:01 pm
  14. Thanks for the heads-up!

    Scribbled by Les on 22/04/08 at 3:45 pm

What are your thoughts?

What do you think? Leave a comment. Alternatively, write a post on your own blog, this blog accepts trackbacks [trackback].

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

Please read the Comment Policy before commenting.

  • Check out one of my favourite sites

    Changes Daily. This is not an Ad!



  • Categories

    • Affiliate Marketing
    • Blogging
    • General
    • Guest Posts
    • List Building
    • Monthly Reports
    • Product Reviews
    • Social Networking
    • Traffic
    • Wednesday Links
    • wordpress
  • Recent Posts

    • A New PC05.11
    • Get More Traffic From Your Tutorials05.8
    • A Surprise In The Mail04.30
    • How To style your Comments - Part 304.28
    • How to Style Your Comments - Part 204.26
    • How To Style Your Comments - Part 104.23
    • The March $100 winner, a problem and a rant04.21
    • Valid XHTML For The EntreCard Widget04.15
  • Bookmarks

    Add to Technorati Favorites
  • Top Commentators

    • Chelsa (1)
    • anto (1)
 

This site's design and contents are ©2007-2008 by CK Marketing - All rights reserved Worldwide

This blog is protected by Dave's Spam Karma 2: 3231 Spams eaten and counting...