Friday, May 18, 2007

How To Correctly Add Together Javascript Codes Inwards Blogger?

While adding JavaScripts codes inwards Blogger template editor, nosotros frequently confront to a greater extent than or less weird XML Errors similar Error parsing XML, business 768, column 20: The content of elements must consist of well-formed grapheme information or markup. These sorts of errors order off when a JavaScript code is non good formed, or the codes are non written correctly yesteryear the developer.  Recently, 1 of our users asked us How to Correctly Add JavaScript Codes inwards Blogger?  This tutorial volition plough out to last useful for those who are merely starting to larn Blogger template as well as plugin development. In this article, nosotros volition demo y'all How to Correctly Add JavaScript codes inwards Blogger?


The Blunder :

Before installing whatever novel codes inwards his template a mortal should brand certain that the script or way tags are properly closed. Most of the times y'all forget to re-create the ending script tag, as well as inwards the destination ultimately it shows errors.  For those who don’t know a lot they usage codes similar this:

<script>
jQuery(document).ready(function($) {
---------------------------
---------------------------
---------------------------
});

Here, it tin clearly last seen that the <script> tag is non followed yesteryear a proper closing </script> tag which is wrong. The right technique is to unopen the tags properly, similar nosotros produce inwards uncomplicated HTML.  Let's become ahead as well as await at the right way of doing it.

How to Correctly Add JavaScript codes inwards Blogger?

Adding Scripts inwards Blogger is extremely straightforward. All y'all demand to produce is to become to Blogger.com >> Your site >> Template >> Edit HTML. Now it depends on y'all where y'all would similar to glue your JavaScript coding. However, nosotros prefer y'all to add together it higher upward the </head> tag because this is the house where all technical things are present. Here’s how the code would await like:

<script type='text/javascript'>
//<![CDATA[
Your JavaScript coding here
//]]>
</script>

Once the script is correctly added inwards your template hitting the “Save Template” button, as well as this y'all would non confront whatever errors. Which agency that the JavaScript is correctly added inwards your blogger template.

We promise this tutorial has helped y'all inwards learning how to properly add together javascript codes inwards blogger. Let us know almost your experience? In illustration y'all convey faced such errors too. Feel costless to exit whatever mistake below that y'all are facing acre adding novel codes to your template. 

No comments:

Post a Comment