Thursday, May 6, 2010

Generating free of cost

http://www.fpdf.org/

Very useful for generating fancy table using PHP and that also free of cost.. :)
The other tool pdflib is not really good as it is costly... and some other php_pdf.dll thingy also causes issues as it is tough to find correct dll and generating dll from source requires to understand something into pecl...

Thanks
Suarabh

Thursday, April 8, 2010

Generating PDF files from server side PHP..

http://www.devarticles.com/c/a/PHP/Use-PHP-to-Create-Dynamic-pdf-Files/1/

http://articles.sitepoint.com/article/generate-pdfs-php

Working on it.. will update it later...

SJ

Tuesday, April 6, 2010

Excellent Dojo date poicker examples

http://www.upscale.toronto.edu/test/dojo/tests/widget/test_DatePicker.html

Here is date picker with localization thingy supported...
using it now... :)

SJ

Thursday, February 25, 2010

How to put lightbox on your website

I did lightbox task using YUI once.. it took me two days to get that piece of code working... so i was bit apprehensive about light box....

then today i found this "ThickBox" thing which makes light box so easy that it seemed to me that there can be nothing simpler than this...

so first goes the link:
http://jquery.com/demo/thickbox/

Issues:
1. Light box does not capture the tab button....
2. It works on top of jQuery... so it might break with some other javascript library.. but fortuantely in my case Dojo + {ThickBox + Jquery} model worked perfectly..

I am glad it did as it reduced hour long task to seconds...

A small info to add.. this link is good for color coding things..
http://html-color-codes.info/

SJ

How to put Videos on your website

This is very simple thing to do:
As usual, first i'll post the links which i found best and helped me in understanding the concept with ease...

This one gives the code snippet for scenarios when u have a video player and corresponding files to play...
http://www.sothinkmedia.com/guide/putvideo.htm

then other wonderful link is this one...
http://flowplayer.org/index.html
This made things lot easy .. the readme.txt and examples in downloaded zipped reduced the whole thing to just two lines...

SJ

Dynamic table creation using Javascript

As u might know, i was struggling with Dojo Data grid and data table concepts...
so i decided to go back to basic...
I thought of implementing the table using normal DOM manipulation API like createElement, appendChild etc...

This particular link made my task a lot easy..

http://www.eggheadcafe.com/community/aspnet/3/83650/dynamic-creation--of-html.aspx
http://www.codeproject.com/KB/HTML/html.aspx

This gave me the basic code for create dynamic tables...
there were few bugs which i fixed ...
But it has a big drawback... I want my table to be wrapped in some kind of scrollable div so that in case i need to limit its height in future i can get it to work...

Let me see how to do that next.. Till then see yup/./

SJ

Wednesday, February 24, 2010

Dojo Data grid with JSON data

Right now i am struggling with displaying with JSON data in DOJO grid on the front end..
Data can be either in a file... or returned as response to AJAX request.

Most helpful links:
For JSON as AJAX data.. This is more useful link than any but does not work for me...
http://blog.sonores.de/2008/03/14/dojo-tutorial-with-a-grid-part-3-english-version/

This one explains using DojoTable.. Though it is not that useful but still good to read after first one...
http://www.sitepen.com/blog/2007/11/06/simple-dojo-grids/


Problems i am facing are weird...
1. this.model is not defined...
2. Nothing is getting displayed and no error as well..
Confused what is the issue...
3. Styling related issues...

Will update you on this...

Friday, February 5, 2010

Problem statement CSS

Hi, I have been struggling with this CSS issue for like infinite time now. Suddenly a thought came... As Swami Vivekanand has said "If you know your problem then you have solved it 90%"...
So here is my problem statement:
Without using table trick or absolute position and width parameter,
How to place div element of page in parallel to each other and over top of each other?

There will be one top div element where height and width can be defined but rest should be dealt in % and positioning concept.

Reason for not using absolute position and tabular structure is that i am doing internationalization so string length varies from language to language. If i use table and position then things get screwed from one language to other.
I am not sure if table less and positioning based thing will solve that problem but thats how i wish to do it.

Any one who read this problem statement, please respond to my problem.
Its like taking infinite time for me to solve this issue.


In the understanding of whole position and css thingy.. many links helped me a lot but one link specifically i would like to mention and that is:
http://www.barelyfitz.com/screencast/html-training/css/positioning/



SJ

Friday, January 29, 2010

Database handle in PHP-mysql

This is the two line code i use to connect to database through PHP:

$dbhandle = mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");

The great thing about this code is that once dbhandle is created then any call to mysql_connect will reuse the old dbhandle. This is very nice abstraction provided by PHP-mysql connector. I dont know if this is same with other connection object or not...

SJ

Thursday, January 28, 2010

A brief on web related technology

http://sharat.wordpress.com/
This page explains some of the web concept in brief ...
Some of them are useful...

SJ

After a month

Sorry i was on vacation lately so had nothing much to post...

Recently i was working on database part of my project...
I had a doubt about auto-increment primary keys that what happen if some fields are deleted in future {which will happen in 99.99% of scenarios } then primary key does not remain sequential and those gaps will never be filled and eventually when project scale heavily then auto-increment field will reach its maximum and project will crash...

I discussed it with friend and in his opinion, auto-increment field is automatically taken care by the database so nothing to worry,... Moreover one should keep in practice to not write program to access primary key sequentially.

He also mentioned that i could use LDAPs for authentication of my system...
Will write rest later...

SJ