javascript - How can I fill data to extjs component using querystring? -


For example, if I have a combo box, and I like the URL like http: // localhost: 8080? Param =

Value1, value2, value3

I get this & lt; & Lt; Ultimate & gt; & Gt; ExtJS in the value , so that I can call it Ext.data.Array or ....

I have this (based on the code found in @loyd):

  var the_query_string = new object (); (Function () {var qs = location.search.substr (1) .replace (/ \ + / g, '') .split ('& amp ;;); for (var i = 0; i & lt; Qs.length; I ++) {qs [i] = qs [i] .split ('='); if (qs [i] [0]) the_query_string [qs [i] [0]] = decodeurIComponent (qs [I] [1]);}}) ();  

So I can use any query string variable at global level. Like when location.search = '? Search = Hello + World & amp; Foo = bar% 3Dbar ''

the_query_string.search = 'Hello World' and
the_query_string.foo = 'bar = bar'


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -