How to use syntaxhighlighter v3.0.83 on blogger
Tech-Today

How to use syntaxhighlighter v3.0.83 on blogger



The previous version of syntaxhighlighter uses flash to render the code, but in this version they are only using javascript.

Here's how I integrated syntaxhighlighter to this blogger blog.

Sample Source Code

<pre class="brush: java">
public static void main(String args[]) {
void helloWorld() {
System.out.println("Hello World!);
}
}
</pre>


What needs to be included, I used syntaxhighlighter hosted files:
Make sure to add these files before the </body> tag.

<!-- syntax highlighter -->
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJava.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushXml.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shAutoloader.js' type='text/javascript'/>
<link href='http://alexgorbatchev.com/pub/sh/current/styles/shCore.css' rel='stylesheet' type='text/css'/>
<link href='http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css' rel='stylesheet' type='text/css'/>
<!-- /syntax highlighter -->

<!-- Add-in Script for syntax highlighting -->
<script language='javascript'>
SyntaxHighlighter.config.bloggerMode = true;
SyntaxHighlighter.all();
</script>




- How To Upload A File In An Mvc3 C# Ajax Form
It's easy to upload file in a synchronous form, where you just post the file and read a HttpPostedFile variable in the server side: In plain html form, take note of the form enctype property: //the view (index.cshtml) @using (Html.BeginForm("Upload",...

- Create A Facebook Like Button And Twitter Share Button
1.) To create a twitter share button, simply go to this URL: http://twitter.com/about/resources/tweetbutton. Customized the look of the widget, copy the code and paste it on your website. 2.) The same steps applies for facebook. Go to this url: http://developers.facebook.com/docs/reference/plugins/like/....

- How To Access Asp:textbox With Runat=server Attribute In Javascript
For example you have a textbox which has a default value, and you want to clear that value when the user click on the textbox: <asp:TextBox ID="txtBox" runat="server" onclick="clear()" Text="Enter Keyword" /> <script type="text/javascript">...

- Uploadify Dynamic File Extension
Requirement: To change the file extension depending on the value of a dropdown box. The code will explain how this can be achieve. <script type="text/javascript"> $(document).ready(function() { var fileExt = ""; var fileDesc = ""; var leftSelected...

- How To Fix The Css Hover In Ie7 And How Implement Gzip In Your Page
Tool: php, zencart Recently I've encountered a problem with regards to a css dropdown menu. You can see it here: http://topamanila.com. It's the usual dropdown however the css tags aside from all the browsers like safari, firefox, ie7, opera,...



Tech-Today








.