Showing posts with label webdev. Show all posts
Showing posts with label webdev. Show all posts

Wednesday, April 16, 2008

Creating Error 404 page

Helping lost visitors? Sometimes a link provided by you may end up as 404 page or viewer might have typed wrong URL that doesn't lead correct page on your site. To help your visitors you can actually use .htaccess file (for Apache servers) to redirect all such links to a special page which will be more useful than plain "404 File Not found" error.

You can add this one line to .htaccess file (create this file if it doesn't exist)

ErrorDocument 404 /web404.html
This will redirect all queries for files not found in that directory and sub directories to web404.html
On that page you can provide user with:
  • Link to homepage
  • Tell them to check the URL or Go Back
  • Search functionality for your website will be very useful.
So yesterday I added a 404 page for my website: Check it out

I have also added similar functionality for my wordpress blog. For setting up 404 Error page on wordpress follow this well compiled article: Creating an Error 404 Page

Interesting read: Creating User Friendly 404 Pages
Related Post:
Web Development Tools

Wednesday, February 20, 2008

Adobe AIR: Web to Desktop

Past few days, I have came across Adobe AIR through digg, techmeme, delicious and so today i thought i should try this. Adobe AIR lets us their existing web development skills in HTML, AJAX, Flash and Flex to build and deploy rich Internet applications to the desktop. For Application development you will need two things:


Having Adobe AIR extension for Dreamweaver CS3 can be very helpful as it facilitates to package and preview .air application files directly within Adobe Dreamweaver CS3.

As my first AIR application, I ported my rubiks cube timer as a desktop application (RubikTimer.air). Its very easy using dreamweaver extension, have a look here : Create your first HTML-based AIR application with the AIR SDK (great tutorial for beginners).

One problem I faced: Usually setInterval("display()",500) works with Firefox/IE but it was not starting with no error message to look into but then i found out about using Adobe CommandLine tool. (via Three ways to debug Adobe javascript Application). It´s called ADL and resides in the /bin folder of the SDK. ADL showed the Error: "Unsafe javascript". Then after some random changes when i change it to "setInterval(display,500)", It started working. Another problem I faced was related to keypress events in javascript, were not working with AIR (still have to resolve this issue)

Download RubikTimer.air here
Web Based Rubik Cube Timer

Related Post:

Sample Adobe AIR Applications
Trying hands on Google gadgets

Trying hands on google gadgets

Tonight i tried creating some google gadgets (actually its quite easy using Google Gadget Creator). You can check out them here: Google gadgets . You can use html / javascript (as in any other webapage) to create gadgets.Rubik timer gadget So i converted my Rubiks Cube Timer to a gadget. Other one is a gadget to search stock, scripts on bombay stock exchange.

You can also create gadgets using : Make your Own Gadget (Which is as simple as filling out forms)

Friday, December 07, 2007

Chart API for webpages

Cool....Great yet Simple..

Embed charts in webpages with one of our simplest APIs yet

We actually built this originally to use internally - we use it on Google Video and Google Finance for example. It seemed like it would be a good thing to open up to other users too. You can find out all about it at on the Google Chart API homepage and there's a Google Chart API group for questions and support.

Google publishes chart API for web pages
A single HTTP GET request with parameters is all you need. You can even use the URL as the src attribute on an img tag.

Also Read:Programmable Web: Google’s New Chart API

Sunday, February 25, 2007

OpenID ??

today i read this article which explains what openid is ??

Lately OpenID has been hitting the front page of digg, del.icio.us, and many other large websites.
Read More>>
OpenID - What is it, and why everyone is talking about it
you can also go through..
Authenticated Distributed Search (OpenSearch, OpenID)
Add OpenSearch to your site in five minutes

Additional link(offtopic and old article but i came across this well written article and couldn't resist posting it.. ):
What Every Webmaster and Web Developer MUST Know About Ruby on Rails and AJAX It’s not a tutorial, it’s not a “how-to” but he explains very well just what the heck all this.

Saturday, February 24, 2007

Web Development Tools

Great listing of web developers powertools by Brennan Stehling.
I'll starts with extension for firefox that comes very handy while web devlopment.

  • Web Developer : Adds a menu and a toolbar with various web developer tools.
  • Firebug: Allows you to edit debug, and monitor CSS, HTML, and JavaScript live in any web page.
  • ColorZilla: Advanced Eyedropper, ColorPicker, Page Zoomer and other colorful goodies.
  • Live HTTP Headers
The list Web Development Tools for the Power Developer contains :

Validators

Javascript

Websites

Read More>> (also containing ASP.NET, Proxy tools)
And w3schools, a great place for finding tutorials realted to web development.

Updated(29 April 2007) : Tools for web-designers.

Related Post :

Thursday, February 22, 2007

Improving interactivity with Javascript

HTML controls other than conventional Push buttons, radio buttons, check boxes, select boxes, and text inputs, can power up forms, webdev using javascript to increase interactivity and easy (for users). List of such controls includes : slider, Date picker, Smart text boxes, Advanced tooltips, Auto validation etc.

Read more friendly bit >> Improving interactivity with Javascript
In addition, I find image maps also very handy when it comes to intereactivity when used properly with tooltips...as i used them in Paint Chat.

Bonus link[ :) ] DailyBlogTips > Web 2.0 Webdesign Tutorials
Related post :

Monday, February 12, 2007

Firebug : web development evolved

I found firebug very useful while developing my Paint Chat (which is not a big code as such but still), so here it goes in admiration of firebug:

Firebug integrates with Firefox to put a wealth of development tools at your fingertips while you browse. You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page.
Firebug is firefox addon that helps you in webdevelopment with
its powerful feature such as javascript debugger, Inspect and edit HTML, Tweak CSS to perfection, Monitor network activity, Explore the DOM and many more. Feature I like most is its quickly diagnosing problem, it allows you set break points and checking intermediate values of variable for javascript thus making a great javascript debugger. Many times you are stuck at where did the code went wrong so in way its a lot useful in saving time.



I also like is its inspecting html and modifying html and css on fly and see the results with helpful tooltips. It also help in positioning of divs, images with its nice feature of visuallizing css metrics with ruler and box model coloring(HTML inspecting).

It other great feature is its interface which is comes with browser window split in two halves one for your website and one is extension interface (though it also can be detached from it). I am also a fan of Web developer toolbar extension but what it lacks is a java debugger and this great interface but both are a must of a web developer.

Related Post :

Firebug - Web Development Evolved

Sunday, February 11, 2007

Play with html using javascript

Javascipt can be very fruitful and flexible when it comes to modifying webapges dynamically (though client side). Javascript can be helpful in creating response to browser events like mouseup, mouseover etc, veryfying of form values prior to submitting them, changing style and value of html elements dynamically.
Examples i disscuss here are being user by me in developing Paint Chat !! So here I go..
You can write javascript functions and code in section as:

<script type="text/javascript">function test(){
alert("test javascript");}</script>

Action on events:

Example of events can be mouseclick, keystroke, submitting form etc.
With onload()
 <body onload="init()">
Now init() function will be called when this html page is being loaded.
For links, javascript function can be evoked when clicking, mouseover over links like
 <a href="javascript:replay()">Refresh ! </a>
Now function replay() will be called when Refresh! is clicked. For input text box
<input type="text" size="30" id="search" onchange="suggest()">; 
Now whenever content of textbox changes the function suggest() will be called. It can be useful when feature like google suggest has to be implemented or so.

On submitting forms:
<form method="post" action="some.php" onsubmit="return checkForm()">
So whenever this form is being submitted checkForm() function will be called and can be helpful in verifying values of form elements.

onMouseOver and onMouseOut:
<a href="http://www.buard.blogspot.com" onmouseover="fade()">
<img src="image.gif"> </a>
Now when mouse is over image fade() function will be called and can be used for animate and styling purposes.

Registering of events

A simple way can be:
Conside the html code : <div id="sample"> ..... some... html..text.. </div>
Now using javascript you can register event for this div by:
 var div_sample = document.getElementById('sample');
div_sample.onmousedown=sampleMouseDown ;
Now whenever mouseover ocours over this div html element sampleMouseDown() function will be called. Events can also be registered using addEventListener() . Find more information baout it here:Advanced event registration models

Modify Style and values for html elements

Within some javascript function, you can first get the element object by getElementByID() getElementsByName() for example conside the javascript code:
document.getElementById("colorcode").innerHTML = "#000000";
document.getElementById("bgtest").style.backgroundColor= "green";
The first line find the html element with id colorcode and then set its value to "#000000" using innerHTML. In second line, it sets the background of html element with id "bgtest" to green.

Some other tweaks which were useful :
  • Calling some function repeatedly with some time interval, consider javascript code:
var intervalID = setInterval(drawCurve, 100);
So the drawCurve() function will be called repeatedly after 100ms. You can cancel this process( removing repeatedly calling) by clearInterval(intervalID);

  • You can use setTimeout(drawCurve,100) function to delay drawCurve() execution for a specified time period(100ms).
  • Calling a php function inside javascript:
var testImg = new Image();
testImg.src = "form.php?name=form_value";
Now here in form.php you can fetch value of variable name using $_GET and can perform appropriate action.

Some links:Related Posts:

Friday, February 09, 2007

Paint Chat !!


Now chat using a paint brush !!.

I had made this app which uses paint brush to express yourself and share with others. This uses HTML:Canvas for drawing graphics using javascript, so no sluggish java applet and flash. It uses XMLHttprequest to synchronize paint screen with server. You can share this url with your friends to have a chat with paint brush and use Refresh !! to update your paint screen with that of your friend.
Read about Paint chat.
Try It out : Paint Chat

Updated: I have added feature for filling up whole background with color and also the transparency feature.

Related Post:
Shout-Box

Sunday, February 04, 2007

Web 2.0 ... The Machine is Us/ing Us

I found this awesome video through digg . It explains how web has evolved making it more interactive, flexible and useful through videos, photos, map, search and much more...
Web is becoming more powerful with technologies like Ajax, XML etc
It was created by Michael Wesch, an Assistant Professor of Cultural Anthropology at Kansas State University.




Youtube Link

Tuesday, September 26, 2006

Del.icio.us Bookmark search..

Yesterday i made this del.icio.us bookmark search page. It takes xml file as input and search for bookmarks according to tags and title. It start searching as you type.
here is link : Del.icio.us SearchER

Any suggestion are welcome... :)

Updated URL !
Related Link: My Del.icio.us Toolbar

Wednesday, July 19, 2006

An Introduction to AJAX

AJAX (Asynchronous JavaScript and XML) is the latest boom in the Web development world. AJAX helps developers narrow the gap between desktop and web applications — Google Earth, Flicker and MS Outlook Express Web Version are some of the applications powered by AJAX.

Asynchronous means that you can make a request to a server and perform other actions while the server is processing your request -- and on the arrival of the response required actions can be performed -- as opposed to conventional web applications, in which the user has to sit back and stare at the blank screen while the server is processing the request.

AJAX Architecture :
Figure 2

Read More >>
Source : Topcoder