Quantcast
Channel: Redino blog
Viewing all articles
Browse latest Browse all 80

ExtJS Convert Query Parameter Object to URL

$
0
0

Assume we have a parameter object

var parameters = {name: 'POS', min_price: 10, start_date: '2016-01-01'};

 

To convert it to URL query, we can use following code

Ext.urlEncode(parameters);

it will output

name=POS&min_price=10&start_date=2016-01-01

 

And to concatenate two URL part, we can use following code

Ext.urlAppend('http://test.com/products/export', Ext.urlEncode(params));

It will build URL like following

http://test.com/products/export?name=POS&min_price=10&start_date=2016-01-01

 

 

 

The post ExtJS Convert Query Parameter Object to URL appeared first on Redino blog.


Viewing all articles
Browse latest Browse all 80

Trending Articles