• support[@]kurinchilion.com
  • +1 (888) 666-4252

Tags

Javascript code organization for optimized performance

Oct 01, 2009 - by kurinchilamp / UI, CSS / Post Comment
Knowing how javascript code gets executed in a browser will help us organize the libraries or functions for better performance. Javascript unlike the server side scripting languages like PHP, ASP, Perl is not compiled at the server side. It is sent as-is from the server to the browser client and it is the browser that interprets the code at the client side. The total size of the Javascript code and its organization will have a significant effect on the pages served at the client side which in turn will affect the performance of the page. Organize the libraries in such a fashion that you only have the needed functions associated with the page. You can consider this point right at the time of creating your template pages. This will reduce the number of javascript pages that are called from one page. (more…)
Continue Reading

How to open ALL external web sites or references in a NEW window?

Sep 05, 2009 - by kurinchilamp / HTML, UI, CSS / Post Comment
Using JQuery to open external links in new windows Earlier we used to write a string of code in javascript to enable opening external references in a new window in addition to modifying the html code With JQuery, this can be done with one line of code as shown below
$(document).ready(function(){
    $("a[@href^='http']").attr('target','_blank');
});
The above line checks for occurences http in a tag and if a link has "http" in it, JQuery opens the link in a NEW window. According to W3C standards, the target attribute has been removed from xhtml 1.1 specification. Sample script to open external links in New Window
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-GB">
<head>
<script src="js/jquery-1.3.2.min.js" type="text/javascript"></script>
<script language="javascript">
$(document).ready(function(){
    $("a[href^='http']").attr('target','_blank');
});
</script> 
</head>
<body>


Testing the pages - Open Links in new <a href="http://yahoo.com">window</a>.

<h1><a href="http://www.kurinchilion.com">Kurinchilion</a></h1>
</body>
</html>
Continue Reading

JQuery: Showing a progress image while processing background task

Jun 11, 2009 - by kurinchilamp / UI, CSS / Post Comment
I thought to write a simple example to show a progress bar or a gif image showing a that a task is happening at the background using a jquery function. i) Include jquery script file in the header section and the following code in the head
<script language="javascript">
$(document).ready(function(){
    $('#progress').hide();
    $("#main a.bgdiv").click(function(){
        $("#progress").show("slow");
        $("body").load($(this).attr('href'));
        return false;
    });
});
</script>
(more…)
Continue Reading

jQuery extension Impromptu

Jun 06, 2009 - by kurinchilamp / UI, CSS / Post Comment
This is an easy and elegant way to prompt user messages or to seek user inputs. The author of this tool had cleanly explained its various usage by giving examples which is again easy to follow. Check out the extension at http://trentrichardson.com/Impromptu/index.php
Continue Reading

TECHNOLOGY DEV STACK

Following are some of the technologies that we use to build and maintain solutions for our clients.