My iRule has a problem with Java Script

This irule is to block users coming from a proxy to specific links in an oracle application. One of the links is a java script that launches a form. The logic seems to work because I see the redirect to the sorry page but since the Java script pops up several windows, the main window never gets redirected. Any help would be greatly appreciated…

This iRule does several things…

1)if the uri is “/” then redirect to a login page

2)if the request is from our proxy(192.168.17.4)and if the request matches the URIs, then redirect to a sorrypage

when HTTP_REQUEST {

if { [HTTP::uri] eq “/” } {

HTTP::redirect “https://someapp.somedomain.com/pls/portal”

}

else {set my_uri [string tolower [HTTP::uri]]

log local0. “----------------”

log local0. “URI :[HTTP::uri]”

log local0. “----------------”

log local0. “IP info: [IP::remote_addr]”

if {[IP::addr “[IP::remote_addr]” equals “192.168.177.4”] }

{if { [matchclass $my_uri starts_with $::uris] }

{HTTP::redirect “https://someapp.somedomain.com/OA\_HTML/Sorry.html”}

}

}

}