PDA

View Full Version : Trouble Closing EXT window



sajan
13 Jul 2010, 10:32 PM
Hi there is a button in my form.
So when the button is clicked it opens a newEXt window on top of the form.
There is a close button (not the cross button)
Before updating myself to Designer simple win.close used to close the window (I guess) but I am stuck closing the window now.
Please guide me to close the window
thanks in advance

jarrednicholls
14 Jul 2010, 6:40 AM
Hi sajan,

The "close()" method will close the window. Can you show me your code, perhaps there is something incorrect with it?

Thanks.

sajan
14 Jul 2010, 6:52 AM
Thanks Jarred:
Code to open the new window


onUpdateButtonClick:function(e, t)
{
var winnew = new UserProfileWindow();
winnew.show();

}
My plan is if success is returned then close the opened window



onSubmitButtonClick:function(e, t)
{
this.SupplierInfoRef.getForm().submit(
{
url: '/4DACTION/WEB_Functions/SessionID/UpdateSuppInfo/',
success: function(form, action){
close();

},
failure: function(form, action){
alert('Something went wrong...');
}


}



);

}
Please help
thanks

sajan
14 Jul 2010, 7:47 PM
Did you notice some problem?
thanks

jarrednicholls
15 Jul 2010, 4:15 AM
Hi sajan,

Yes, the call to close is not being called on a particular instance, it's being called as a literal function, which means it needs to exist in the local or global scope.

What you want to do is call this.close(); and make sure you pass the "scope" option to your form submit() call.



onSubmitButtonClick:function(e, t)
{
this.SupplierInfoRef.getForm().submit(
{
url: '/4DACTION/WEB_Functions/SessionID/UpdateSuppInfo/',
success: function(form, action){
this.close();

},
failure: function(form, action){
alert('Something went wrong...');
},
scope: this

}



);

}

sajan
15 Jul 2010, 6:51 AM
Thanks Jarred,
Yes it worked as always. Now I am 90 % done with my project. Thanks to you and Designer. Without Designer I could not have able to reach to this stage in such a short time.
Except some glitches with designer (grid and combo combo boxes forgetting their store or either interchange in store)
all is great.
Since my project has become like EXTJS's "Desktop" Example will it be really be heavy for the browser in the real life scenario?
please inform me

thanks
ps: I have 1 license for designer can I use in multiple machines at different instance of time?

jarrednicholls
15 Jul 2010, 10:01 AM
Hi sajan,

I'm glad you are finding the Designer helpful. Please let me know if you experience any bugs by posting on the Bugs forum, I always want to make sure bugs are found and eliminated as soon as possible so your experience is stable, predictable, and productive.

A desktop application will run fine, there was a Desktop example that was written a long time ago in Ext JS, and it worked very well in most browsers. Of course, there are certain modern browsers that give a much better experience overall (Chrome and Safari for instance).

Your license is tied to you as a user/developer. You can use the Designer on as many machines as you use with your license.

Thanks much.