While i was at Parambikulam last year on a trek, one of the tribals gave me some info, which i am not sure is authentic or a safe option, but he swore it worked.

1. While fleeing an elephant charge/attack on foot, strip your clothes and throw them away and keep running - the elephant usually shreds the clothes to pieces following the scent.

2. Always carry red chilli powder with you and if the elephant gets too close and as a last resort, throw it at it's eyes (if you are still alive until then :-))

As i said, for all you know, this could be tribal 'Mumbo Jumbo' (pun intended) but who knows, in the west, pepper sprays are known to stop huge grizzly attacks.

regards
Rajan