Thursday, March 01, 2007

Javascript document.all vs document.getElementById

Recently I was playing with a project using ajax and php.
I wanted that one select box "onchange" event would call an ajaxian function.
Then it would go to php and updated the information in the screen. Clean. fast and easy. Yeah!

Then I tried to pass the select box to the function using "this".
OOP rules.

something like onchange="ajax_set_client_id(this)"

here in this function i tried to get another select box present in the form and call another similiar function.

i tried using this piece of code i found in the net.

if (document.all) {
element = document.all[id];
else {
element = document.getElementById(id);

Please dont use it. Please stick to document.getElementById(id);
Simon Willison says basically it it usefull and old school.
all the browsers since 1998.. almost 10 years ago, support the good old document.getElementById(id);

i found later an article here.

Thursday, May 26, 2005

A remote control for all your devices at home.. What can I do with it?
Here is a short list of some of the things you can do with HomeSeer.
Set your lights to come on at sunset and off at sunrise Set lights and appliances to go on and off at different times based on whether you are home or not Access all your lights and appliances remotely via the web Control your lights and appliances via email From work or on the road you can access YOUR email via any web browser. Stop using those free email accounts to get at your mail Send and reply to your email via the web Control your VCR from the web Have your computer speak when your email arrives and tell you who it was from Automatically respond to email Speak to your computer and have it execute commands, like launching programs, reading mail, controlling lights and A/V equipment. Control your heating and cooling system and keep track of how long the system has been on. Interact with Microsoft Agent characters without using the keyboard to listen

 Posted by Hello

Xbox 360 Ushers In the Future of Games and Entertainment

Highly-Anticipated Video Game Console Unveiled On MTV Special

NEW YORK � May 12, 2005 �Celebrating the dawn of a new era in entertainment, game fanatics across the globe came together tonight for the televised unveiling of Xbox 360�, the future-generation game and entertainment system from Microsoft. An audience of millions watched MTV: Music Television as celebrities, professional athletes, musicians and Xbox officials took the wraps off the much-anticipated system, ending months of intense speculation and satiating consumers worldwide.

The new Xbox 360 places players at the center of powerful next-generation games and entertainment experiences. The elegant design features a breakthrough wireless controller and an array of Faces, interchangeable face plates that let gamers personalize their console. The unveiling spotlighted some of the groundbreaking Xbox 360 games in development for the new system, advancements for Xbox Live�the runaway leader in online gaming services�and new digital media experiences that only Xbox 360 can deliver.

�With the first generation of Xbox, our ambition was to change the way people think about video games,� said Robbie Bach, Microsoft�s chief Xbox officer. �Starting today with Xbox 360, our ambition is to revolutionize the way people think about fun.�

Xbox 360 will unleash the greatest game lineup in the history of video games when it launches in North America, Europe, and Japan this Christmas holiday. The games that captured the color, drama, and fun of high definition game play at the MTV unveiling included: 2KGames� NBA 2K6, Activision�s Call of Duty 2, QUAKE 4 and Tony Hawk's American Wasteland�; Electronic Arts� Madden NFL 06, Need For Speed: Most Wanted and Tiger Woods PGA Tour 06; Majesco Entertainment�s The Darkness, Microsoft Game Studios� Perfect Dark Zero, Kameo: Elements of Power, Project Gotham Racing 3, and Gears of War; THQ�a Saint�s Row, and Ubisoft�s Ghost Recon 3. Posted by Hello

Wednesday, May 25, 2005

BBQing is great fun, but can be a remarkably messy experience that requires a lot of delicate juggling to get the food just right, and a whole heap of clearing up afterwards.
This compact indoor/outdoor (how great to have a BBQ indoors on chillier days!) electric grill is just the pup's nuts. It has a fully adjustable thermostat with heat settings up to a mighty 400F, and it's entirely non-stick and a joy to clean. The grill is split so half is perfect for grilling and half is smooth, and it has a removable and dishwasher-safe fat tray (so all the fatty stuff gets drawn away from your food). The lid doubles as a wind-break if it's a bit gusty outside, and if the weather really turns nasty the grill is a piece of cake to remove from its stand, so you can cook on a table indoors.
We can't think of anything the makers haven't thought of to make this the most versatile, compact and cook friendly BBQ around - they've even put cup holders into a shelf unit on the stand! No messy charcoal, no smoke, a 2.2kW piping hot grill, and you can cook wherever you like - what more could you possibly need?
 Posted by Hello