Can i change header redirect in php to javascript redirect with same status

My site is seoitc.com, we are using joomla for this site, but have 1 problem when i try auto redirect to anypage that show error: Warning: Cannot modify header information - headers already sent by ().
I tried change redirect to use js but cant use same status(302,303...) same as in php. Please help to fix this problem please.
Thanks!

just before the header call and then view source after you run it to see if there is any white space or characters prior to the word "End" in the html source. If there is then you are, or something is, outputting content to the page prior to the header redirect attempt which means that headers have already been sent to the browser and a 302 is no longer possible at that point.