PDA

View Full Version : Dynamic URL in Ajax



boben
19 Apr 2012, 11:59 PM
Hi All,
I am a new sencha touch developent, My app support multi customer, each customer have 1 domain(url). I want to create setting Form that user can set enter configure value for Url , and use Url value in Ajax request. Can anyone help me?
Many thank.

mitchellsimoens
20 Apr 2012, 7:32 AM
So you want a text field to allow someone to enter a url?

boben
20 Apr 2012, 4:36 PM
Yes, Correct. Thank for your reply

lgertel
20 Apr 2012, 4:49 PM
Maybe this can help you:



var products = Ext.getStore('Products');
products.getProxy().setUrl('my/new/url');
products.load();

mitchellsimoens
21 Apr 2012, 6:43 AM
When the submit button is tapped on and you go to do your form.submit, get the url from the values.


var values = form.getValues(),
url = values.url;

form.submit({
url : url
});