Results 1 to 5 of 5

Thread: Ext.Ajast.Request error

  1. #1

    Default Ext.Ajast.Request error

    Hello everybody. i am a new user of Sencha ExtJS and actually i build a MVC website with it. I create a login form and when i send informations from my login form i get this error from Firebug :

    NS_ERROR_DOM_BAD_URI: Access to restricted URI denied

    [TABLE]

  2. #2
    chramer's Avatar
    Join Date
    Feb 2011
    Location
    Chisinau, Moldova
    Posts
    316
    Answers
    64

    Default

    Please provide a code sample

  3. #3

    Default Ext.Ajast.Request error

    /*
    * To change this license header, choose License Headers in Project Properties.
    * To change this template file, choose Tools | Templates
    * and open the template in the editor.
    */
    Ext.define(
    'SecureDT.controller.Login',
    {
    extend: 'Ext.app.Controller',

    requires: [
    'SecureDT.util.MD5'
    ],

    view: [
    'Login'
    ],

    init: function(application) {
    this.control({

    "login form button#submit": {
    click: this.onButtonClickSubmit
    },

    "login form button#cancel": {
    click: this.onButtonClickCancel
    }
    });
    },

    onButtonClickSubmit: function(button, e, options) {
    var formPanel = button.up('form'),
    login = button.up('login'),
    uts = formPanel.down('textfield[name=utilisateur]').getValue(),
    mpt = formPanel.down('textfield[name=motpass]').getValue();

    if (formPanel.getForm().isValid()) {
    mpt = SecureDT.util.MD5.encode(mpt);



    Ext.Ajax.request({
    url: 'php/login.php',
    params: {
    utilisateur: uts,
    motpasse: mpt
    }
    });
    }
    },

    onButtonClickCancel: function(button, e, options) {
    button.up('form').getForm().reset();
    }
    }
    );
    Attached Images Attached Images

  4. #4
    chramer's Avatar
    Join Date
    Feb 2011
    Location
    Chisinau, Moldova
    Posts
    316
    Answers
    64

    Default

    This is not ExtJS related. This is a security exception in AJAX. It appears because you are trying to do a cross domain request.From the screenshot you provided I can see that you've opened the application index file directly. This isn't right.You need to install a web development environment on your computer, something like wampserver or easyphp.

  5. #5

    Default

    Ah ok. thank. i do it with xampp server.

Posting Permissions

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