Tuesday, December 12, 2006

Reward of Kabini

Call after alarm call signalled the presence of a tiger very close to us. Chitals stood alert with their tails up and ears perked up giving out the loud shrill call. A loud "Cow" - an abrupt shrill call very close to us. A flurry of running dots as the deer bolt. The lantana bushes still cover the tiger from us. We wait patiently and impatiently, wait intently, expectantly. A few minutes pass. A lull. Long laden lull. The deer grow silent. No more alarm calls. The tiger is gone. Not even a glimpse.
The aura of the tiger is no longer felt. Deer go back to their grazing, langurs back to their mischief.


We move on. Disappointed. The night is closing in. We exit the jungle right on time. Our guide Sivanand suggests we try our luck along the road. Our headlights on, we go at a slow pace. A small herd of wild gaur. Huge animals, very close to us. Unperturbed, happily grazing away. One crosses the road in front of us as we wait. Slow, deliberate, unconcerned by our presence. A few metres ahead, a big tusker. Elephants close to your vehicle are not very comforting. A lone male tusker doubly so. We watch, torchlight on the tusks. The elephant leaves us alone.

Alarm calls again. Chital very close. A predator nearby. Experience braces us for disappointment, but optimism still lurks. Sivanand points in the other direction from where we are looking. A smallish stocky animal. Comes out of the cover of the forest. Starts walking on the road. Slightly hurried. Aware of our presence. We move slowly towards it. Our headlights on, but slow enough not to frighten it away. Slow enough to frustrate us to know there is a leopard in front and we cannot see it clearly. Frustrating.

It was a good decision. The leopard moved off the road to the right. We moved in slowly. The pale yellow beam lights the animal's rump as it ambles slowly into the bushes. Then it stops and sits down. In the light of the torch. A female, not too big leopard. The eyes glint reddish in the light as she looks at us for a brief moment. Into the light, into our eyes. Lovely. Brief. She gets up and walks on, away into the bushes, into the darkness, and into the jungle. Back to her comfort zone. And we move on to ours.

Saturday, December 02, 2006

Button tag problems and IE 6

Discovered that IE and Firefox handle the <button> tag differently.

If you have a tag like

< button type="submit" name="b" value="abc">
Button Text< /button>


When the form is submitted, the value of the parameter "b" is "abc" in firefox (the value attribute) while for IE, it is "Button Text" (the innerText)

Workaround?

We needed to submit a form using different buttons and each should send back its respective value.

We used

< input type="submit" name="b" value="Button Text 1">
< input type="hidden" name="Hash_of_Button_Text_1"
value="value1">

< input type="submit" name="b" value="Button Text 2">
< input type="hidden" name="Hash_of_Button_Text_2"
value="value2">


and on the server, accessed it by

params[hash(params["b"])]

where hash("Button Text 1") returns Hash_of_Button_Text_1