RG, I think that you can use top.window.close() if you are trying to close the entire page. window.close() probably isn't working because ModalWindow uses an IFRAME if I remember correctly.
If you want to close only the ModalWindow and not the entire window, I would take a look at how it's done in ModalWindow.closeCurrent(AjaxRequestTarget). HTH, Russell nanotech wrote: > > Hi, > > In my project there is a modal window.In event of WicketRuntimeException > it goes to custom Internal Error page. That Page has a button which > overrides onComponetTag method and attaches "javascript:window.close()" > with "onclick" event. So that user can close the modal window.(I don't > want user to use [X] button in right top corner so I have hidden that > button through CSS). The problem is this [javascript:window.close() ] does > not close modal window but it does work in regaular page.(i.e. if > execption occurs on a regualr page then after the request is forwarded to > Custom Internal error page then user is able to click on close button and > the browser window closes.) > > Can some one please suggest me how to achieve this is modal window. > > Thanks, > RG > -- View this message in context: http://www.nabble.com/Closing-ModalWindow-using-javascript%3Awindow.close%28%29-tp19860774p19908897.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
