Button to close a Window

I create a window and attach the content from a file with attachURL
I want to put in this file one image for close this window with ‘onclick’ and I write for close this window:

but I have an error and don’t close.

How I must do?

parent.dhxWins.window(‘ventanaLogin’).close() would be more correct as attachURL loads a page into an iframe