Hi Tulsi,
What do you mean by "not working"? Do you mean alert stays on page?
Using Selenium1 you would not be able to see alert on page and the operation of clicking on ok would happen in back ground. If it does not work then you should see alert stays on page. Do you?
On a different note, it is far easy to handle alerts in Selenium 2 then in Selenium 1. If you have just begun with selenium then I suggest to switch to Selenium 2.
~ seleniumtests.com