problem using prettifier

109 views
Skip to first unread message

Ross Boswell

unread,
Jun 26, 2012, 12:22:08 PM6/26/12
to js-code-p...@googlegroups.com
All what happens is onload="printPretty()" appears on the page. Here is my code


<!DOCTYPE html> 
<html lang="en"> 
<head> 
<meta charset=utf-8>
<title> SITE </title>
<link rel="stylesheet" type="text/css" href="/static/css/main.css" />
<link href="/blog/templates/prettify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="/blog/templates/prettify.js"></script>
<!--[if lt IE 9]>
<![endif]-->
</head>
<body>
<header><h1><a href="/blog" title="Homepage"> site<3 </a></h1></header> 
<nav>
<a href="/blog" class="projects"> Home</a> 
<a href="/blog/tag/projects" class="projects"> Projects</a>
<a href="/blog/blogarchives/" class="index"> Blog</a>
<a href="/blog/about" class="about"> About</a>
</nav>
<section>
<article>


<!-- blog post -->
{% block content %}
{% endblock %}
</article> <!-- blog post ends -->

</section>
<footer>
<div class="about">
</div>
<div class="social">
<a href="/blog/feed" class="rss"> RSS Feed</a> |
<a href="#">Twitter</a> | 
<a href="#">LinkedIn</a> | 
<a href="#">Github</a> | 
<a href="#">Facebook</a> |
<a href="#">Email</a> 
</div>
<div class="poweredby">
<a href="https://www.djangoproject.com/">django powered</a>
</div>
</footer>
onload="prettyPrint()"
</body>
</html>

Where could hhe problem be?

jmeile

unread,
Jun 29, 2012, 3:26:06 AM6/29/12
to js-code-p...@googlegroups.com
Dear Bosswell

The problem is that you have to put 'onload="prettyPrint()"' insde the body tag like this:

<body onload="prettyPrint()">

Best regards
Josef
Reply all
Reply to author
Forward
0 new messages