Results 1 to 2 of 2

Thread: cross domain requests using

  1. #1
    Sencha User
    Join Date
    Apr 2012
    Vote Rating

    Default Unanswered: cross domain requests using trying to activate the autocomplete feature of Ext.form.combobx using the following code:

    var RecordDef =[
    {name: 'description', mapping: 'description'},
    {name: 'lat' , mapping: 'lat'},
    {name: 'lng' , mapping:'lng'}
    var ds = new{
    model: 'RecordDef',
    proxy: new{url:'geo-multi.xml', method:'GET'}),
    reader: new{
    root : 'geocoderResults',
    totalRecords: 'count',
    record: 'result'

    var timePanel = {
    xtype: 'panel',
    border: false,
    width: 600,
    bodyPadding: 10,
    layout: 'anchor',

    items: [{
    xtype: 'combo',
    displayField: 'title',
    store: ds,
    typeAhead: false,
    hideLabel: true,
    anchor: '100%',
    listConfig: {
    loadingText: 'Searching...',
    emptyText: 'No matching posts found.',

    // Custom rendering template for each item
    getInnerTpl: function() {
    return '<div class="search-item">' +
    '<h3><span>{[Ext.Date.format(values.lastPost, "M j, Y")]}<br />by {author}</span>{title}</h3>' +
    '{excerpt}' +
    pageSize: 10,

    xtype: 'component',
    style: 'margin-top:16px',
    html: 'live search'
    I have the following problem:
    1- the returned xml content type header is not xml but instead html and this is the output from firebug console:
    Connection Keep-Alive
    Content-Length 409
    Content-Type text/html;charset=ISO-8859-1
    Date Tue, 10 Apr 2012 14:08:29 GMT
    Last-Modified Sun, 08 Jan 2012 08:11:37 GMT
    Server Winstone Servlet Engine v0.9.10
    X-Powered-By Servlet/2.5 (Winstone/0.9.10)
    this is the first problem
    my second problem is that i have a php code that am using to generate my xml file, and its resident in a different domain from the application that am trying to activate the autocomplete can i make cross domain requests through , which is not working in my case and giving me lots of errors ... can any one help please

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Gainesville, FL
    Vote Rating


    The PHP code will need to adjust the header of the response.

    Ajax proxy (there technically is no http proxy anymore, it was renamed to ajax) cannot do cross origin requests. JsonP allows the ability to do cross domain requests but requires JSON and a valid JsonP response.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2

    Think my support is good? Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Tags for this Thread

Posting Permissions

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