-
9 Feb 2011 10:15 AM #1
automatic switch between extjs and touch
automatic switch between extjs and touch
Since touch and extjs are two different but similar libraries, I'm guessing that this couldn't be done by toggling the stylesheets.
So I was wondering, how do people handle this situation?
i'm guessing server side browser detection and delivery of the appropriate libraries? Or is there a better way of doing this?
thanks,
Alex.
-
9 Feb 2011 11:07 AM #2Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- Frederick MD, NYC, DC
- Posts
- 16,169
- Vote Rating
- 28
Welcome to the forums. Please post post in the proper forums in the future. Moved to Sencha Touch Help.

Jay Garcia @ModusJesus || Modus Create co-founder
Ext JS in Action author
Sencha Touch in Action author
Get in touch for Ext JS & Sencha Touch Touch Training
We are also working on Video-based Sencha Touch training: Check it out here.
-
9 Feb 2011 11:08 AM #3Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- Frederick MD, NYC, DC
- Posts
- 16,169
- Vote Rating
- 28
I think the best thing is to detect the user agent on the server side and serve up the javascript accordingly.

Jay Garcia @ModusJesus || Modus Create co-founder
Ext JS in Action author
Sencha Touch in Action author
Get in touch for Ext JS & Sencha Touch Touch Training
We are also working on Video-based Sencha Touch training: Check it out here.
-
9 Feb 2011 11:44 AM #4
I posted a function to detect if a mobile browser device was connected or not.
This was posted during Sencha Touch's private beta but I think you can get some hints on how I've been handling things. I check which browser is hitting the system then for that php session load several variables that change my main php template engine to give the correct flow and javascript files to the device connected. Cause remember there is now tablets with Windows 7 and other full Operating Systems that won't be able to handle Sencha Touch but would use Ext JS instead.
I have gone a little bit further and also checking the viewable size but it's not listed in this function and classified my "screens" by device/browser connected and viewable size. The Sencha Touch screens can auto adjust better then a tablet with Windows 7 on it. Of course this will get better as we get browsers able to tell if it's in landscape or portrait modes using Ext JS. Some of the Sencha Touch which handles this might be in Ext JS 4.0 not sure yet will just have to wait and see.
But for a quick test in Ext JS if the viewable height is bigger then the width then your in portrait otherwise landscape.
http://www.sencha.com/forum/showthre...l=1#post468703

-
14 Feb 2011 9:21 AM #5
Thanks I will check this out, and utilize some serverside filtering.
Similar Threads
-
ExtJS 4 + Sencha Touch
By sg707 in forum Ext 3.x: Help & DiscussionReplies: 4Last Post: 2 Feb 2011, 9:58 AM -
ExtJS 4 and Sencha Touch API resemblance
By gevik in forum Community DiscussionReplies: 1Last Post: 19 Dec 2010, 12:45 AM -
Sencha Touch = extJS 3.x or extJS 4.0?
By bardaste in forum Sencha Touch 1.x: DiscussionReplies: 5Last Post: 14 Dec 2010, 6:23 AM -
[3.0]Automatic translation of ExtJs Components v1.5
By tomim in forum Ext 3.x: User Extensions and PluginsReplies: 20Last Post: 25 Sep 2010, 1:29 AM -
Touch and ExtJS
By sps196 in forum Community DiscussionReplies: 3Last Post: 30 Jul 2010, 11:18 AM


Reply With Quote