Results 1 to 6 of 6

Thread: [fixed]There is no effect when I using Ext.Msg.alert

  1. #1
    Sencha User
    Join Date
    Jun 2018
    Posts
    8
    Vote Rating
    0
      0  

    Default [fixed]There is no effect when I using Ext.Msg.alert

    I'm using Ext.form.field.Combo, fire it's change event
    then in change event
    I used Ext.Msg.alert
    like this
    Code:
    addProducts: function (combo, record, eOpts) {
      var stor = record[0].data;
      var products = this.lookup('purchase-add-productgrid');
      var gridstore = products.getStore();
      var result = gridstore.findRecord("ProductId", stor.ProductId);
      if (result != null) {
       var error = 'Exist[' + stor.ProductNo + ']';
       Ext.Msg.alert('info', error);
       return false;
      }
      else {
       var rec = Ext.create('HLZ.model.purchase.addproductgridmodel', {
        Id: 0,
        ProductId: stor.ProductId,
        ProductNo: stor.ProductNo,
        ProductName: stor.ProductName,
        ProductUnit: stor.Unit,
        ProductUnitName: stor.UnitName,
        Mode: stor.Mode,
        PurchaseQty: 0,
        UnitCost: record[0].get('UnitCost'),
        NoTaxUnitCost: record[0].get('NoTaxUnitCost'),
        PurchasePrice: record[0].get('PurchasePrice'),
        TaxRate: record[0].get('TaxRate')
       });
       gridstore.insert(0, rec);
      }
     }
    but it's no effect
    something i missed?
    Last edited by phoebej89; 11 Jul 2018 at 6:47 PM. Reason: fixed it

  2. #2
    Sencha User
    Join Date
    Jun 2018
    Posts
    2
    Vote Rating
    0
      0  

    Default

    Maybe try to require Ext.MessageBox?

  3. #3
    Sencha User
    Join Date
    Feb 2017
    Posts
    6
    Answers
    1
    Vote Rating
    0
      0  

    Default

    Are you sure compiler enters the `if` statement where result is not null ?
    Is there anything in console?
    type `debugger;` before `if` and check the statement manually from dev tools

  4. #4
    Sencha User
    Join Date
    Jun 2018
    Posts
    8
    Vote Rating
    0
      0  

    Default

    thks for your reply, i have debuged this code , and the breakpoint has hint 'if', the result is not null, but eh..........

  5. #5
    Sencha User
    Join Date
    Jun 2018
    Posts
    8
    Vote Rating
    0
      0  

    Default

    thks
    in this form and its controller, the orther fun() can alert, there is no alert in this fun(), only

  6. #6
    Sencha User
    Join Date
    Jun 2018
    Posts
    8
    Vote Rating
    0
      0  

    Default

    I hava fixed this
    because i used floating:true
    so
    the messagebox be coverd under the combolist

    fix: set the messagebox's zindex

Similar Threads

  1. Replies: 1
    Last Post: 15 Apr 2014, 10:19 AM
  2. Ext js alert not coming but normal js alert working fine
    By sachin sachdeva in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 20 Dec 2010, 1:18 AM
  3. JS alert working fine but extjs alert not
    By sachin sachdeva in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 17 Dec 2010, 2:49 AM
  4. How to make a effect like the Ext.msg.alert() to cover the banckground?
    By safewolf in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 25 Sep 2008, 11:18 PM
  5. Ext MessageBox.alert not Similar to javascript alert(..)
    By ext420 in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 10 Jul 2007, 1:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •