1. #1
    Ext User
    Join Date
    Apr 2007
    Posts
    189
    Vote Rating
    0
    captainm1uk is on a distinguished road

      0  

    Default Closing a browser window from a toolbar

    Closing a browser window from a toolbar


    Hi I have a toolbar with several button on it. One of them being Close. I want to close the browser window but it doesn't work.

    In the button I have the handler: closeHandler and the actual function I am using window.close()
    When the button is clicked, nothing happens.

    does window.close work with ext or is it something else

    Thanks

  2. #2
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,963
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Default


    There are restrictions (browser settings) in effect these days that prevent that from happening.

    Sometimes you can coerce by setting window.opener to an object, and try self.close().

    Not easy
    "be dom-ready..."
    Doug Hendricks

    Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.


    Got Sencha licensing questions? Find out more here.


  3. #3
    Ext User
    Join Date
    Apr 2007
    Posts
    189
    Vote Rating
    0
    captainm1uk is on a distinguished road

      0  

    Default


    Thanks for that but tried it already
    function closeHandler() {
    self.close();
    }


  4. #4
    Ext User
    Join Date
    Apr 2007
    Posts
    189
    Vote Rating
    0
    captainm1uk is on a distinguished road

      0  

    Default


    Just an update

    window.close() & self.close() work when the form is in read mode but not in edit mode ???

  5. #5
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,963
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Question


    Are we talking about the Browser.window.close, or
    Ext.Window.close ??
    "be dom-ready..."
    Doug Hendricks

    Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.


    Got Sencha licensing questions? Find out more here.


  6. #6
    Ext User
    Join Date
    Apr 2007
    Posts
    189
    Vote Rating
    0
    captainm1uk is on a distinguished road

      0  

    Default


    Browser.window.close

Thread Participants: 1