-
19 Aug 2011 6:09 PM #1
Unanswered: How to ger Url parameters with Sencha Touch
Unanswered: How to ger Url parameters with Sencha Touch
How can get a parameter from the url, i mean if have
page1.html#token=12345
i need to get the token from the url, in sencha how it is?
-
20 Aug 2011 8:56 AM #2
Hi, this is not related with Sencha Touch, i use this javascript function to retrieve url parameter:
;Code:function gup( name ){ name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); var regexS = "[\\?&]"+name+"=([^&#]*)"; var regex = new RegExp( regexS ); var results = regex.exec( window.location.href ); if( results == null ) return ""; else return results[1]; } var urlparam = gup('yourParam')
-
20 Aug 2011 2:46 PM #3
Ext.urlDecode("foo=1&bar=2"); // returns {foo: "1", bar: "2"}
Olivier - interfaSys
Developing custom solutions for BlackBerry 10 using Sencha Touch.


Reply With Quote