Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7413885
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:58:17+00:00 2026-05-29T06:58:17+00:00

I would like my store in Sencha touch to load a different PHP file

  • 0

I would like my store in Sencha touch to load a different PHP file depending on which item in my carousel is clicked. Each item in my carousel has itemid: {number} assigned. This is my store at the moment:

var store = new Ext.data.Store({
        model: 'One',
        proxy: {
            type: 'ajax',
            url: '/carousel2store/Carousel 2_files/get-album.php',
            reader: {
                type: 'json',
                root: 'albums'
            }
        },....etc

I’ve tried altering the store like this which gives ‘/carousel2store/Carousel 2_files/get-album2.php’, but I would like to make the number 2 dynamic, so it changes on click:

var store = new Ext.data.Store({
        model: 'One',
        proxy: {
            type: 'ajax',
            url: '/carousel2store/Carousel 2_files/get-album' + '2' +'.php',
            reader: {
                type: 'json',
                root: 'albums'
            }
        },

I’ve tried to add the itemid

url: '/carousel2store/Carousel 2_files/get-album' + '{itemid}' +'.php', and
url: '/carousel2store/Carousel 2_files/get-album' + '{data.itemid}' +'.php',

But I’ve had no luck so far. A very helpful guy on the sencha forum suggested I try this:

var store = new Ext.data.Store({
        model: 'One',
        proxy: {
            type: 'ajax',
            url: '/carousel2store/Carousel 2_files/get-album{itemId}.php',
            reader: {
                type: 'json',
                root: 'albums'
            }
        }
    });

    store.proxy.url = store.proxy.url.replace('{itemId}', 1);

    console.log(store);

…but I can’t get it to work in my testing when clicking with the mouse, I think because it loads the store already before the carousel and item tap listener (at least it didn’t work for me in my testing with the mouse). I think I need a way of force updating the store name straight after item click.

Thanks in advance

🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T06:58:18+00:00Added an answer on May 29, 2026 at 6:58 am

    I had a somewhat similar problem where I need to dynamically change the URL on my proxy. I found that this works particularly well in most cases, just be sure to handle your load sequence properly.

    store = Ext.StoreMgr.get('YourStore');
    store.setProxy({
        type: 'ajax',
        url: 'http://www.yoururl.com?foo=bar',
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to store a variable in php session using node.js. Then load
I would like to store log4net config data in my application.config file. Based on
I would like to store images in my mySQL database using the CodeIgniter PHP
I would like to store and load numpy arrays from binary files. For that
I have a Moose class that i would like to store using Apache::Session::File. However,
I would like to store a collection of custom objects in a user.config file
In ASP.NET I would like to store an object in the cache which has
I've a couple of email templates and I would like to store each in
I would like to store db connection information in the application web.xml file and
I would like to store all of my dotfiles on GitHub, including .gitconfig which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.