Thank you Tim.
I tried javascript but it didn't work.
My guess to why it didn't work is because javascript runs in the Web browser only and hence the JSF lifecycle was not invoked.
I will try your other suggestion, but actually I have several buttons on the JSF page and I would like to open different windows depending on the button pushed. I will
test whether your other suggestion can handle this situation.
Cheers,
Avi.