in reply to IF..output to frame

I'm not quite sure what you are asking for. Your HTML is a <a> tag which references to a frame, it has nothing to do with perl but rather the browser looking at your HTML.
If you want a specifik action _in the browser_ you should use javascript. If you want to change the HTML _before_ it is shown in the browser you can alter your script to output some different HTML...

T I M T O W T D I