you need to be careful with hand-coded scripts, because they can be different in ajax/ non-ajax mode, and where you call it etc can get quite complex.
So the best way to add a script, is to use the p_web.Script method.
The simplest form of this is;
p_web.script('parent.frames.right_frm.location.reload();',net:nosend)
Cheers
Bruce