Popular JavaScripts which makes the web more richer and interactive

October 3rd, 2009 by Sunil

Now a days, JavaScript is unavoidable for any website. JavaScript enriches your website in the form of giving more interactivity to your web page and help to dressing up your web page.

The use of JavaScript can be listed like this

  1. Checking and correcting the form data in the user side
  2. Dynamically change the web page without reload it.
  3. Create applications like calculator, simple applications and games.
  4. Add effects to a web page which will attract more visitors

These are the important use of JavaScript. Some of them are very important, some of them not that much. Here I am showcasing some important JavaScript tools which commonly using in website.
Read the rest of this entry

Collapsing and expanding footer using JQuery

September 24th, 2009 by Sunil

Footer concept changing day by day. Web2 footer is big and lot of links and information carrying on that. Here you can see different types of footers.

Today I am going to discuss about collapsing and expanding footers. Most of the site doesn’t have collapsing and expanding footer. But It would be nice if you have one like that. Because it is easy for the user. If he wants to see that he can otherwise not. It avoids the unnecessary scroll.

Read the rest of this entry

Free tools to develop a website

September 19th, 2009 by Sunil

Last couple of weeks I was in search of some free tools to develop a web. I found that some alternate softwares instead of buying some professional / costly software. I switched over to Ubuntu operating system. Even though here I am discussing with some free softwares usable for either in windows or linux.

I had been using Adobe softwares for web development. These softwares are very professional but very costly. After I switched over to Ubuntu I never touched these software and through out from my PC.

Read the rest of this entry

Finding 404 elements inside a page using firefox extensions

September 4th, 2009 by Sunil

If you are website developer and if you are uploading images and other files to your web server, you might face some problems with file upload especially large amount of images through ftp. Or you might forgot to upload some files. It would be easy to find such forgot things through some firefox plugins (extensions). In this blog I added test.gif to my page. Lets see how we can test this with different plugins. If you are using safari web browser there is an activity tab. You can find missed resource from there also. Also you can use Xenu software which will scan all your web and will return appropriate status.

Read the rest of this entry

Do we really need to support Internet Explorer(6)?

June 5th, 2009 by Sunil

I started browsing with Internet Explorer. It was in early 2000’s. At that time I thought it is the only browser which I can connect to internet. I continue using Internet Explorer till the end of 2004! Since at that time I never checked any websites in any other browser.

Things changed in the beginning of 2005. I have joined a new company. Yes! I have fall in love with Firefox.

What makes me love Firefox browser?

Read the rest of this entry

Different ways to include jQuery in your website

May 30th, 2009 by Sunil

jQuery is javascript frame work which simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.

You can include jQuery in different ways. 

1.Download it from jQuery site and include it into your webpage

1
<script src="javascript/jquery-1.3.2.min.js" type="text/javascript"></script>

2.Include it from Google server

1
2
3
4
5
6
7
8
<script src="https://www.google.com/jsapi"></script>
<script>
google.load('jquery', '1.3.1');
</script>
 
or
 
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>

3.Include it from Jquery’s site 

1
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.pack.js"></script>

These are the different methods to include jQuery. Each of them have there own advantages and disadvantages.

Read the rest of this entry

Find the biggest from the unordered list or ordered list

April 13th, 2009 by Sunil

Yesterday I came around the situation to find the biggest li from the list of unordered list (UL). I have done that. And added a class which is the bigger in the list. Same can be apply to the ordered list (OL) too. I think it will be helpful for the others too. It is using jQuery as javascript framework. 

If you have any questions or alternate solutions please let me know.

The code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <title>Find the biggest from the unordered list or ordered list</title>
<script type='text/javascript' src='jquery-min.js'></script>
<script type="text/javascript">
    $(document).ready(function() {
		len=$("#list li").length;
		bigger=0;
		for(i=0;i<len;i++)
		{
			val1 = $("#list li").eq(i).text().length;
			if(val1 > bigger)
			{
				bigger = val1;
				pos =  i;
			}
			else
			{
				bigger = bigger;
 
			}
		}
	alert("postion "+ (pos + 1) + " is the biggest with "  +bigger+ " characters");
	$("#list li").eq(pos).addClass('bigger');
});
</script>
</head>
<body>
    <ul id="list">
	    <li>123</li>
		<li>1234</li>
		<li>123456789</li>
		<li>12345</li>
 
	</ul>
</body>
</html>

Download the source

How to create a simple navigation using CSS and XHTML

April 12th, 2009 by Sunil

When I wrote about the Unobstructive image gallery listing using CSS, many people asked me to post some tutorial on this blog. So that will be helpful for others. So I decided to create some tutorials on this blog. This is the first step for that.

Here I am trying to make simple navigation, which uses the html tag unordered list (ul li). It would be nice if we are using unordered lists for navigation menus. We can easily manage the navigation though DOM and it may help a little bit on SEO (Search Engine Optimisation).

Before creating this navigation, I am expecting that you may have some simple idea about HTML and CSS. 

First, we have to create one simple html like the following on your favorite html or text editor. I am using intype editor for creating the document and I personally like to code it by hand. I am not using any other user interface software for creating the html elements.

So the html code will be like the following

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<link rel="stylesheet" href="style.css" type="text/css"  />
<title>Create simple navigation using CSS and XHTML</title>
</head>
<body>
<ul class="nav">
			<li><a href="#">Home</a></li>
			<li><a href="#">About Us</a></li>
			<li><a href="#">Contact Us</a></li>
			<li><a href="#">Site map</a></li>
		</ul>
</body>
</html>

 
So, our html is ready!

Next, we need to create the CSS.

Since we are not creating any other pages, I am only covering the styles required for the current page. Before that, we need to add the style sheet path to the document like this inside the head tag.

<link rel="stylesheet" href="style.css" type="text/css"  />

Now I am creating the style sheet required for the page

I wrote the following code on the style sheet style.css file

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
body{
margin:0;
padding:0;
font-family:verdana, arial;
font-size:12px;
}
ul.nav{
margin:0;
padding:0;
list-style:none;
}
 
ul.nav li a{
text-decoration:none;
}

Now the vertical navigation is ready. You can add color for the anchor tag as you wishes like this

ul.nav li a{
text-decoration:none;
color:red;
}

If you want to add some color on the mouse over, you simply need to add the color for the element

ul.nav li a:hover{
color:green;
}

So the mouse over is also ready. You need to add proper padding, margin to the ul li tags, and then it will look nice.

Now I am changing this to horizontal navigation. For that we need to float the li selector. So it will looks like this

ul.nav li{
float:left;
padding-right:15px;
}

 
Padding-right used for the space required after the each menu. So the basic menu is ready.

Download sample file Less than 1 KB.

This is the very basic navigation style that can be creating with XHTML CSS. We can enrich the menu by adding background colors, background images or roll over effects. That all things I will explain another time.

Hope this tutorial will be interesting to you. If you have any doubt, suggestions or questions please post comment.

Create charts with Google Chart API for your web applications

April 3rd, 2009 by Sunil

First of all I am thanking to every one to make my last blog a hit. I got a lot of comments even one guy from Microsoft. Once again thanks to everyone

Google is always coming with innovations that make the people life easy. Hope you have remembered my post in google category. That was about “Language translation ajax api for Indian languages from Google”. Like that couple of weeks back Google has announced Google maps ajax api. If you are a web developer you can simply use the Google Chart API to create charts (dynamically) for your web applications. It was using by Google for their Google Finance, Google Video etc. It looks nice and tones of options.

Different types of charts available with Google chart API

  • Line charts
  • Bar charts
  • Pie charts Updated!
  • Venn diagrams
  • Scatter plots
  • Radar charts
  • Maps
  • Google-o-meters
  • QR codes

How to generate the chart?

We can simply generate the chart by calling the url like this


http://chart.apis.google.com/chart?<parameter 1>&<parameter 2>&<parameter n>

eg: 

http://chart.apis.google.com/chart?

chs=250×100
&chd=t:60,40
&cht=p3
&chl=Hello|World

Where:

http://chart.apis.google.com/chart? is the Chart API’s location.

& separates parameters.

chs=250×100 is the chart’s size in pixels.

chd=t:60,40 is the chart’s data.

cht=p3 is the chart’s type.

chl=Hello|World is the chart’s label.

I am not able to describe all the options. Please have a look at the Google chart API documentation.

Expression Web SuperPreview for Internet Explorer and a few questions

March 24th, 2009 by Sunil

Couple of days back Microsoft announced Super Preview for Internet Explorer . As a web quality analyst I personally welcome this move from Microsoft. I thought we can check the projects in different browsers with in this software. I downloaded it from Microsoft even though it is available only for trail version. It has 250 MB! I decided to test something. I have opened a site with authentication (we developers, always working with authenticated site because of search engines crawling. It is not a good idea to crawl a site before it developed?). But it never opens with a site with authentication. I think this software supposed to use for web testers and web developers.  But it never meets its primary objective.

So, I decided to test with some other live sites. It opened in to two panes, one with internet explorer 6 and another with internet explorer 7. Okay, I could find some differences between two panes. Good.  I could easily understand something. I tried to add another browser with add image icon. It is asking for image format! May be ISO image? I am not sure. Any way I couldn’t add another browser to this software. I googled it and found that current version will not support to add new browser!

I checked with my friend who is using windows 7. Immediately he said that it doesn’t have ie6 preview.

Here in this link (http://blogs.msdn.com/xweb/archive/2009/03/18/superpreview-for-internet-explorer.aspx) you can check how funny the developer described these things as ‘known issues’.

I could not understand, what is the primary objective with this software? (It is not supporting other browsers now, other than Internet explorer). For testing Internet explorer alone we can use IETester or vitrual os or we can use desktop sharing method. Why these people rush to release this software and without proper testing? (While installing this software our computer will crash for sometime! And there are many issues. They have agreed these problems in the Blog itself (http://blogs.msdn.com/xweb/archive/2009/03/18/superpreview-for-internet-explorer.aspx))

There are some other software are doing their job well. eg. IETester. In this software you can check ie6, ie7 and ie8! And it is free of cost.  Also there are some online testing services are available like browsershots.com, crossbrowsertesting.com and a lot.