Archive for May, 2007|Monthly archive page

Web tutorials *Yawn Yawn*: Webonic

Do u also Yawn thinking of tutorials available on web? Be it Php, Mysql, CSS etc, Its all same stuff, again and again in new fonts!!!!

Its time for some real new useful stuff and not same yawning.

I have started a new blog, which I call it as my technology playground.

Its important to write code, and Its even more important to build some useful code and share it with community.

Since, this blog is more personal. I will write and collect all the tutorials which I will be working/learning for buliding my own web product.

http://webonic.blogspot.com/

Webonic will contain tutorials, code, demos related to PHP, MySQL, AJAX & CSS. Its not user-generated/collected, all will be stuff I am working on. You are free to add if you want to.

Happy Hacking
Sridhar

Webtoons for Podworks. Please leave your feedback.

I have been working on making some Webtoons for Podworks unconference.

Podworks

I know you will hate me for delaying but I am sure, you know the pain of Day job as well. Dont you? Kool.

So Here I am with 4 of my webtoons. I have tried capturing them using my mobile so clarity is not that good. But if you like the concept or the webtoons itself. Please drop me a line.

Thanks to Amit Ranjan’s company Slideshare for easy sharing of slideshows :)

Your feedback can help me to improve things I am lacking.

Also let everyone know which one you liked???

Thanks
sridhar

Bloggers, Come Let’s Fight Cyber Crime!!!!

Is Internet safe for girls???

A guy and a gal meets on cyberspace, they become friends, write testimonials, talk on phone, then they meet and finally the Girl Is Found Dead.  

Its not the first time in India, that such kind of accident has happened, but the question that everyone would ask is when will it be the last one???

I read in last week’s Times of India Sunday Edition, that a guy from Hyd was caught as he took some personal information from a girl from mysore and started blackmailing her or else he will post the information across porn sites. Girls need to be more careful[1]

What can we do to restirct net crimes [2]??? Is Internet a crime zone medium? 

Read one such story and please spread awarness among your peers to make Net a better place to live.

http://www.indianexpress.com/story/31150.html

Its shame to see such things as it hampers the wanna-be Web-Entrepreneurs.

Imagine you start a web service/product and things like these happen, and one-fine day Govt says close all these sites or even worst if parents restrict children to come to Internet.

huh? Any comments??

Cheerz
Sridhar

PS: 1] A personal advice to all the girls out there on Net, please dont share any personal information on web to strangers. Remove all the phone numbers, photos, videos, address etc from your profile. You can have a Net identity, fake name!!!!

2] If you happen to have a blog, write about it, dicuss such matters, spread the word of awarness. If you cant, atleast ping back this post.

How-To create Rounded Corners using RICO Library!!!

How-To create Rounded Corners using RICO Library!!!

In my previous two posts I have covered some tutorials using Script.aculo.us to enhance the User Experience. But, Script.aculo.us doesnt have the beauty of adding Rounded Corners, which RICO is rich in!!!!

1. Making a simple SlideShow using Script.aculo.us
2. How to Use Script.aculo.us Effects to add beauty

In this tutorial, we will explore yet another AJAX library. RICO Library

RICO is a powerful, creative ajax library which gives you control over UI designing as well as functionality.

In this tutorial, we will see how to create Rounded Edge Corners.
I assume these steps are already done before you see the naked code.

1. You have downloaded RICO library. If not, you can do it here
2. You have downloaded the Prototype Library. If not, you can do it here
3. Enable javascript in your system.

OKay, so lets see the code:

Include all the files{Rico & Prototype} inside the html code.

<head>
<script type=”text/javascript” src=”../src/rico.js” mce_src=”../src/rico.js”>  {SRC should be ur rico.js path}
<script type=”text/javascript” src=”../src/prototype.js” mce_src=”../src/prototype.js”>  {SRC should be ur prototype.js path}
</head>

so once, we are done with including the libraries to your html file.

Now, time to add some content to the Body of the html file.

<body>
<div id=”roundMe” style=”position:absolute;top:240px;left:35px;width:250px;background:’lightblue’;color:’red’;”>
<div id=”Content” style=”height:200px;width:250px;padding:8px;”>

Hello This is me, a Rounded Corner hell.

</div>
</div>
</body>

Understanding this particular code is very important, from the compatibility point of view. Coz if you skip some of the style parameters, this code wont work properly in IE.

U know IE sucks!!! {Keep an eye on Padding, it stinks in IE}

Okay, so no big deal here in code. Just two DIV tags and inside the child DIV the content is placed.

Simple, Isnt it? kooool. Lets go and add a simple line and see the magic.

Now, that we have decided the structure and included the libraries, what are we waiting for? Oh, yeah we still need to call the functions of RICO.

<script type=”text/javascript”>
Rico.Corner.round(’roundMe’);  // The parameter is the id of the outer DIV tag
</script>

What else? Not much. Just save it and see the magic.

If you still want to keep on hacking other options, you are always welcome!!!

Just add these parameters to the same line.

Rico.Corner.round(’roundMe’,{color:’transparent’,compact:true,blend:true;});

What all other options one can add to Corners?

1. Color
2. Blend
3. Compact
4. Color
5. BgColor
6. Specify which corners to be rounded
7. border.

For more information. Visit Demos @officially site of RICO.

Yes, some folks out there can argue that we can do it with CSS also. I agree with you. But can you do it in just one line of code?

Sorry dude!!!

Anyways I have attached a simple code for the same at the bottom if you can want. Take it, use it, try it and please let me know as well, if I missed any.

Cheerz
Sridhar

Download COde: ROunded Corner Using RICO Library

If you are reading article, you might also be interested in the PHP and Scriptaculous Book I have authored.

The book gives you insights about effects, drag-n-drop, slideshows, applications, auto-completion, in-place editing and more. Complete code snippets and explanations.

CHECK out and BUY the PHP and Script.aculo.us book at Packt official site

mybook

http://www.packtpub.com/php-and-script-aculo-us-web-2-0-application-interface/book

Why do I blog?

Why do I blog?

Most of the blogs I surf, are mostly about How-To blog or “Earn through your Blog” or more or less same pitch!!!!

Blogs have become a prominent way of expressing self/marketing etc. We can see millions of blogs around us in the virtual universe called “Web”.

Himanshu: Blogging Breeds Entrepreneurship, has a good write up on the same lines, which says Blogging gives you a Entrepreneurial edge!!!

Now, coming back to my question, I blog because whatever I am trying/doing/re-searching etc I find it very easy to write down for later purpose or even better if someone is also looking/working on the same lines can find the tips/tutorials useful.

I mostly write about AJAX{my love} and some tutorials on CSS, MySQL & PHP.

A simple example, I would like to give you how this works for me and others.

Try to google, “script.aculo.us based slideshow”.

What you find as first link is my tutorial “Script.aculo.us based Slideshow”. I wrote this particular piece of code, coz I was frustated of not finding the same. Now, if someone else is also looking for the same, just feel free to use it. Why to re-invent the wheel?

And, lastly I write whatever I am trying to build, which is getting added to my application. In this way, I am keeping track of building my own product/features as well helping others.

My two cents in helping web community and making web more fun place to live & learn.

Now, your turn: Why do you blog? tell everyone through comments.

Cheerz
Sridhar

UI Designing with CSS: Example login form

After the dot com bubble, start-ups are growing like mushrooms everywhere. And, 80% of these being either in Consumer Internet or Mobile.

So what do these web-based start-ups focus on mostly?

User Experience. Users have become powerful and above all decision makers. If users like the service, UI, application they will support it else they will kill them.

Talking about user experience, Its very important to understand what would a user appreciate? I will explain this taking a simple example of login form.

A simple login form would consits of normal buttons and a table.

Enter Name: <input type=”text”>

Enter Email: <input type=”text”>

<input type=”button” value=”Submit”>

No big deal. A simple two text boxes and a submit button. Simple?

Okay, so why not make small yet sweet changes to this code?

Through adding CSS{Cascading Style Sheets}!!!

Lets add some style on mouseover and mouseout operations.

<input type=”button” class=”Button” onmouseover=”this.className=’ButtonHover’” onmouseout=’Button’”>

In the style section just add the following piece of information.

Button {
background:green;
}

ButtonHover{
Background:lightgreen;
}

This would add the following functionality to our code.

Whenever the mouse is moved over the button the background is set to lightgreen and whenever removed again back to green.

Though there is no big deal here, the thing that needs to be taken care is that small useful things matter and count.

Cheerz
Sridhar

If you are reading article, you might also be interested in the PHP and Scriptaculous Book I have authored.

The book gives you insights about effects, drag-n-drop, slideshows, applications, auto-completion, in-place editing and more. Complete code snippets and explanations.

CHECK out and BUY the PHP and Script.aculo.us book at Packt official site

PHP and Script.aculo.us Book

PHP and Script.aculo.us Book

http://www.packtpub.com/php-and-script-aculo-us-web-2-0-application-interface/book

Podworks.in: Unconference Unplugged Again!!!

Podworks 

What is Podworks?

Podworks is India’s biggest unconference on Audio & Video podcasting.

Podworks Schedule?

Its in Tidel Park, Chennai on June 9th and 10th 2007.

Who’s behind Podworks?

I bet if you are one of those active bloggers/web-workers/entrepreneurs, you must have heard of Knowledge Foundation, Chennai. Sorry, gifts for guessing, the same guys behind Proto, BarCamp, WikiCamp.

What we can expect in Podworks?

You trust me on this, all unconferences are worth attending!!! No wonder, in Podworks, lot of sessions on Audio Sessions+ Video Sessions+ Social + Professional Networking.

Did I tell u, one can have loads of fun as well?

Where should I register for Podworks?

Awesome. You are already eager to attend. For now, just register here

I have already registered, and If you are also planning to attend. Drop me a line, we can surely catch up on coffee.

Cheerz
Sridhar

How to make a Modal Window using Prototype?

Okay, its been somedays I was working on how to create a simple, beautiful yet powerful modal window for a project I am working on.

Modal Window sometimes called as Modal Dialogue box, are widely used across to increase the user experience.

After doing a lot of {re}search, I came across, Lightbox by Lokesh. Then, I came across this LightBox Gone Wild, yes by the folks behind Wufoo.

I must admit, these guys have done a great job!!! Thanks for sharing this.

Now, coming back to our tutorial.

You must have prototype AJAX library to use this {sorry for Non-prototype lovers}. Once, you have both Prototype and Lightbox Gone Wild.

Just add them to your html page.

<link rel=”stylesheet” href=”css/lightbox.css” mce_href=”css/lightbox.css” type=”text/css” />
<script src=”scripts/prototype.js” mce_src=”scripts/prototype.js” type=”text/javascript”></script>
<script src=”scripts/lightbox.js” mce_src=”scripts/lightbox.js” type=”text/javascript”></script>

Once, we have added the libraries to the html page. Now, we move on to create the lightboxes {a.k.a simple html files which will be shown in our Modal Window.}

Some HTML files, lets us say About.html

<p> About Us Page</p>
<h3>This is a simple About Me page, where you can add all HTML tags.</h3>

Now the important task: Activating the Lightbox

<a href=”About.html” mce_href=”About.html” class=”lbOn”>About Me</a>

Notice: the italics class=”lbOn”, onclick this will call the function to load the lightbox.

We can add all the HTML tags inside a lightbox, which means there are N number of options for you to surprise your friends.

De-Activating the Lightbox

<a href=”#” mce_href=”#” class=”lbAction” rel=”deactivate”>Close Lightbox.</a>
A simple link, clicking on which will take you back to the page.

Linking it to another Lighbox inside:

<a href=”confirm.html” mce_href=”confirm.html” class=”lbAction” rel=”insert”>Go to Another Lightbox</a>

Till here we saw how to Activate, Deactivate and Insert a lightbox inside a lightbox.

Now, AJAX stuff.

Lets say you want to give, a form to fill to user and collect the data using the modal window. We can do it, with the help of Prototype library. Use the following piece of code.

insert: function(e){
link = Event.element(e).parentNode;
Element.remove($(‘lbContent’));
var myAjax = new Ajax.Request(
link.href,
{method: ‘post’, parameters: “”, onComplete: this.processInfo.bindAsEventListener(this)}
);
}

I am writing a code to add some more functionality like onload, on mouseover etc. Once done will share the code as well.

Cheerz
Sridhar

If you are reading article, you might also be interested in the PHP and Scriptaculous Book I have authored.

The book gives you insights about effects, drag-n-drop, slideshows, applications, auto-completion, in-place editing and more. Complete code snippets and explanations.

CHECK out and BUY the PHP and Script.aculo.us book at Packt official site

PHP and Script.aculo.us Book

PHP and Script.aculo.us Book

http://www.packtpub.com/php-and-script-aculo-us-web-2-0-application-interface/book

A must to be read for every Indian!!!

Please go through this, a must for all Entrepreneurs and educated sections of India.

A story about Suresh Kamat, Managing Director of LaserSoft Infosystems about how one can really make a difference.

Hats off to you Sir!!!

http://www.rediff.com/money/2007/may/10bspec.htm

Cheerz
Sridhar

Spidey is back!!!

In life, you get some you loose some!!! What you love in life, can Hate you and Things you hate, can end up loving you. But, It hurts more when you loose what you love.

But, life goes on. Life has to go on.  As the saying goes in the movie, is very much applicable to real life as well.

“With great powers, comes great responsibilities”

Coz Spidey is Back!!!

Spidey I am planning to watch it, lets see if I can really make it up.

Cheerz
Shri

I am a Blogger,I love Blogging!!!

I am a Blogger,I love Blogging!!!

Okay, to really prove this I have created a comic character for you all. Its called as a “Nerd Monster, who loves to blog”.

Take a look at the image below and let me know what you feel after seeing this. At the end of the post I have given what this image stands for:

Take a look, draw your conclusions, drop in comments and read what I was thinking when I created it.

Webtoonist

Okay, now you want to know what I was thinking when I created it.

So many things in one snap.
1. Did u notice that the monster looks like a nerd? call it a Geek?
2. Did u notice that the blogger is challenging the people in Big Firms and Buildings?
3. Did u see the aggression on his face? Thats the power of blogger
4. Dont you think that, now-a-days Blogs speak louder than any Daily Newspaper?
5. Didnt u think that this blogger stands-apart from everyone else?

I thought so many things before creating this monster.

You are free to drop your comments/critics/feedbacks for improvement. Or above all just drop a line saying you liked it or not?

Thanks
Sridhar

Tutorial: How to make Script.aculo.us Based Slideshow

Before you go on to read this article. If your a newbie to using Script.Aculo.us AJAX library, I would recommend my previous post on getting started with Script.Aculo.us.

Read the article here

Okay, so I presume that you have gone through the previous tutorial. In this tutorial we will see how to make a simple slideshow for our website. You can also download the script along with HTML file at the bottom of the tutorial.

Slideshow’s are pretty common among webstites today. But, most of them being in Flash. Since we can add the same beauty using AJAX I thought of giving it a shot.

So lets get started!!! Start Javascript functionality here!!!

<script type=”text/javascript”>

var slides = array(’slide1′,’slide2′,’slide3′);      // we define a array with all the div-Id’s of the slides.

we have to define a variable “wait” so lets declare and assign some value to it.

var wait = 500;    // interval and time in milliseconds

1. We need the slideshow to start as soon as the site is launched.

For that we have to define a javascript function.

function start_slideshow() {

setInterval(SlideShow(), wait);  // This is a javascript function which acts as a timer.

}

Now, we need to define the actual functionality for the slideshow.

function SlideShow() {

Effect.Fade(Slides[i], { duration:1, from:1.0, to:0.0 });
i++;
if (i == 3) i = 0;
Effect.Appear(Slides[i], { duration:1, from:0.0, to:1.0 });

}

2. We have to add this to our html code.

<body onload=”start_slideshow()”>

3. Lets add some slides to the page.

<div id=”slideshow-content”>
<div class=”slide1″ id=”slide1″>
<h2>My First Slide</h2>
<p> Add some content for your first slide.
</p>
</div>                   // First slide div ends here
<div class=”slide2″ id=”slide2″ style=”display: none;”>
<h2>My Second Slide</h2>
<p> Add some content for your second slide.
</p>
</div>              // Second slide div ends here
</div>

Imp Note: Note how we must use an outer DIV tag to use this. Its a must to have an outer DIV tag.

Now, just put all the code in one place and you can see your slideshow working!!!!

If you have tried/ have any suggestions to improve it pls drop in comments.

Cheerz
Shri

PS:
1] Planning to write a tutorial on slideshows based on images with various control effects.
2] You can also download the code in attachments.

Download the tutorial and see it working

Download: slideshow.txt

If you are reading article, you might also be interested in the PHP and Scriptaculous Book I have authored.

The book gives you insights about effects, drag-n-drop, slideshows, applications, auto-completion, in-place editing and more. Complete code snippets and explanations.

CHECK out and BUY the PHP and Script.aculo.us book at Packt official site

PHP and Script.aculo.us Book

PHP and Script.aculo.us Book


http://www.packtpub.com/php-and-script-aculo-us-web-2-0-application-interface/book

India is what Silicon Valley was some years back!!!

India is what silicon valley was some years back. Why am I saying this?

I can see a lot of start-ups coming from ex-employees of either of Infosys, wipro, TCS etc. After gaining sufficient business knowledge and domain expertise people set out to start their own firms. This is what has happened some 10 years back in now “Silicon Valley”.

While reading the book , ICON-Steve Jobs. In this book a paragraph stuck me, with the companies like Intel etc getting started, growing and then some employees quitted to start their own firm.

Can we relate this with Indian scenario? Yes, we can!!!

I would rather say that now start-ups are growing are mushrooms in the valley. One reason I can figure out why is, coz there were start-ups, hence there are start-ups. Do I make sense?

For start-ups most important thing is mentoring. Mentoring can only be done by people who have taken extra risk to become now “famous”. In India, we can now find Angel investors like KB Chandra Shekar, Kanwal Rekhi etc and need not to say lot of VC firms are growing even faster than the start-ups.

In all, India needs to keep the momentum going by producing more and more of start-ups {again, only product based}. We will be lucky enough to see the whole Indian economy changing in next 10 years.

Cheerz
Sridhar

For wanna-be Entrepreneurs..Why Not to Start a Start-up?

I hear a lot of people around me, wishing but not willing to start a start-up. Reason?

“There can be a beautiful excuse if you dont want to do anything and there can be no reason why one cannot win if he wants to win”

But, there is more to this line. So being very obvious and general.

Paul Graham of YCombinator has a beautiful write-up on Why Not To Start a Start-up?

You can read it here!!!

I would say it’s a must for all wanna-be Entrepreneurs or for everyone!!!

Cheerz
Shri