-
13 Feb 2009 12:24 AM #1
One Web page App and direct links
One Web page App and direct links
Hi,
I have a One Web Page App, a main viewport with a central TabPanel. I'd like to know how to have direct links (that I could provide) to open directly in the center TabPanel.
For example I have a toolbar in my viewport with a Agenda button which add a Tab displaying a schedule.
How could I have a direct link to open it?
(I tried to look how Saki handles that in his Examples site but I think he uses iFrame and it's not what I want to do)
-
13 Feb 2009 12:31 AM #2Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 40
-
13 Feb 2009 12:36 AM #3
OK and how do you handle that in the HTML file?
my root file is html and not PHP and I don't knwo how to get a $_GET parameter in JS
-
13 Feb 2009 12:40 AM #4Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 40
So you have no dynamic server backend? Only a HTTP server?
-
13 Feb 2009 12:43 AM #5
-
13 Feb 2009 12:46 AM #6
I think have found something on Saki examples :
If I well understand, Ext.urlDecode(window.location.search.substr(1)); might give me the query parameter and after I have to handle it.Code:// permalink handling var page = Ext.urlDecode(window.location.search.substr(1)); if(page && page.ex) { var node = tree.getNodeById(page.ex); if(node) { tree.collapseAll(); node.parentNode.expand(false, false, function() {node.expand()}); } showDetail(page.ex); // console.info(page.ex); iframe.setSrc.defer(350, iframe, [Example.root + page.ex + '.html',true]); } else { var ex = Ext.state.Manager.get('ex', 'root'); showDetail(ex); } // }}}
-
13 Feb 2009 12:47 AM #7Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 40
Sorry, ignore the ComboBox remark (I mixed up some posts).
You can examine GET parameters by examining the location.
The API docs use:
(it allows 'class' and 'member' parameters)Code:// allow for link in var page = window.location.href.split('?')[1]; if(page){ var ps = Ext.urlDecode(page); var cls = ps['class']; mainPanel.loadClass('output/' + cls + '.html', cls, ps.member); }
-
13 Feb 2009 12:48 AM #8
Thx, I'm gonna try this.
-
13 Feb 2009 12:59 AM #9
"I love it when a plan comes together "



Reply With Quote