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