IE8 popup

In IE7 I was able to use the following code to click onblur javascript
popups:
def handle_onblur_popup(ie, button, waitTime = 4)
#used to handle certain JavaScript popups
w = WinClicker.new
longName = ie.dir.gsub("/" , “\” )
shortName = w.getShortFileName(longName)
w = nil
f = IO.popen(“ruby #{shortName}\clickJSDialog.rb #{button}
#{waitTime}”)
end

but now in IE8 this is not working. I have noticed that the title on the
popup window in IE8 has changed from ‘Windows Internet Explorer’ to
‘Message from web page’ does anyone have any ideas as to what changes I
need to make to ruby to get the new IE8 to work.

Thanks,
-Eric