[Webscript][Javascript] Retrieve the current path
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-12-2011 06:53 AM
Hello All,
I'm developing webscript under share and I need some parameters on my javascript of the documentLibrary page.
I've got the current site using the expression "page.url.templateArgs.site"
the current container using the expression "template.properties.container"
Unfortunately, I can't get the current path or filterData.
I used the expressions "page.url.args.path" and "page.url.args.filterData" but no one is working.
Thanks for help.
I'm developing webscript under share and I need some parameters on my javascript of the documentLibrary page.
I've got the current site using the expression "page.url.templateArgs.site"
the current container using the expression "template.properties.container"
Unfortunately, I can't get the current path or filterData.
I used the expressions "page.url.args.path" and "page.url.args.filterData" but no one is working.
Thanks for help.
Labels:
- Labels:
-
Archive
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2011 05:02 AM
I also tried page.url.templateArgs.path & url.templateArgs["path"] but without success!
Nobody has any idea!
Nobody has any idea!
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2011 05:27 AM
The document library template removes query string parameters and changes them to hash params so that "ajax history" based navigation can be accomplished on the client.
You'll either have to modify the document library template to store the original path in a context variable before removing it, or read the path from the clientside instead.
Thanks.
Mike
You'll either have to modify the document library template to store the original path in a context variable before removing it, or read the path from the clientside instead.
Thanks.
Mike
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2011 06:05 AM
Thanks Mike for reply,
How can I read the path from the clientside?
How can I read the path from the clientside?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2011 06:52 AM
The best way is to listen for a "filterChanged" event and see if the filterId is "path". The new path will be in filterData.
YAHOO.Bubbling.on("filterChanged", this.onFilterChanged, this);
Have a look at the tree.js code for examples.
Thanks,
Mike
YAHOO.Bubbling.on("filterChanged", this.onFilterChanged, this);
Have a look at the tree.js code for examples.
Thanks,
Mike
