Tuesday, August 30, 2005

Win X-Box (Good way of marketting)

Where there are biggies involve in product marketting its not easy to beat Microsoft. For their new X-Box 360 they are have collaborated with soda giants like Pepsi, Moutain Dew etc. to give away around 9000 xbox for free.

http://pluto.jhuapl.edu/ecard/scripts/addSignaturesForm.php

Good move by microsoft to let people intake more carbs and calories. !

Send your name to PLUTO

http://pluto.jhuapl.edu/ecard/scripts/addSignaturesForm.php

Send your name to the last planet.

Cheers!!

Monday, August 22, 2005

How to Spell And Say My Name !

I was reading about mobile computing at Russell Beattie's blog and came across very interesting topic which i face almost everyday in my life.

http://www.russellbeattie.com/notebook/1007982.html

Isn't it difficult to pronounce all the names (from all country) and not only Indian names.

I had a real hard time to listen my last name spelled correctly by non Indian people. As it involves many k's (3 to be precise) and many h's (3 to be precise) and two a's and further repition of "kh", lets try it out.

K H A K H K H A R

My last name is something which clear's person's throat by making him cough a litte :). You try it out it will clear yours.

Now if we dissect it, it is not difficult to pronounce. Take first four letters and it will same as "SHAKH" so it is "KHAKH" and followed by "KHAR" as in "LHAR".

I understand everybody makes mistake in spelling person's name. I do it many times and i don't expect anyone to be perfect in spelling person's name in one shot. I tell people here to just forget it as its out of their reach and just call me by my first name.

Sometimes it happened that many had pronounced my first name incorrectly as people have tendency to pronounce "i" as "i" and not "e" and vice-versa. Isn't english a funny language. They pronounced my first name as Dipesh (as is diagonal) but actually it is Dipesh(as in Deep).

Well this is enough dissection of my name. But i saw that post on Russell's blog so thought to put it here.

Wednesday, August 17, 2005

AJAX to submit form in one frame by clicking button of another form in another frame!!

Last week i was working on forms in my web application when I came across the situation where I need to submit form1 in frame1 by clicking button2 in frame2 i.e. by submitting form2 in frame1 i was trying to submit form1 in frame1.

Well someone will say to have button itself in the form1 in frame2, but i came across this situation because the form1 in frame1 is very big where there are 1000 check boxes and if i was putting button on the top ( even if i put it at botton user will need to scroll to the bottom to submit it) during scrolling that disappears and after selecting checkboxes user has to scroll up again. As per usability perspective, I didn't wanted moving button or floating button.

Since I had implemented automatic refresh of the screen using AJAX, i thought lets do this using AJAX which has simplified my problem.

So to transmit form1 in frame1 from form2 in frame2, i simply create XMLHTTP object in javascript's event handler for button2 in form2. This will then makes POST request by passing the list of checkboxes selected by user in form1 in frame1. The post array is examined and the list of checked checkbox values are obtained and further processing is done (in my case, i wanted to create a file at the server and this option is available to privliged user only). It can return also the something as an acknowledgment which can be printed.

In my case, i was creating a xml file which was taking time and my server side processing is done by PHP which is not threaded, so i returned nothing but I was refreshing the page after submit. So I check for the file name in the server, whether it is being created or not. I gave a time limit of 45 seconds to create a file, if file is created show the hyperlinked file name so that user can open the file in the browser or show the error message saying "cudn't create file, please try again" (this can happen when some system call fails to create file).

I will post my code today so that it can be used by anyone in such situation.