views:

241

answers:

1

I'm building a search using ext-js. I have an event that fires on keyup. I want to be able to change either the URL I'm searching, or the params. I've had luck with neither.

Here's my snippit of code:

Ext.get("search").on('keyup', function() {
proxy.url = '/customer/list?key=' + $('search').value;
store.load();
});

But, no love for me. The store loads, but the proxy.url is the old value. Is what I'm trying to do possible?

Thanks in advance!

+2  A: 

You'd probably want to use the proxy.setUrl() method instead which internally updates the connection. If changing the params is sufficient, you could also try passing the params config into the load call, e.g., store.load({params: {...}});

bmoeskau
Yup - that's what I was looking for. Thanks!
jeffkolez