c# - How to retrieve the full url of the item -


i working sharepoint 2010 , ecmascript.

i have added customaction context menu of document inside document library.

how possible retrieve full path url of document using ecmascript?

i trying (but fails if im in subsite or site collection)

my custom action:

 <urlaction url="javascript:opendialog('miopiaggo/shoot.aspx?id=' + '{siteurl}' + document.getelementbyid({itemid}).firstchild.getattribute('href'),'shooter');"/> 

and opendialog function is:

function opendialog(dialogpage,dialogtitle) {     var options = sp.ui.$create_dialogoptions();     options.url = sp.utilities.utility.getlayoutspageurl(dialogpage);     options.url += "?source=" + document.url;     options.title = dialogtitle;     options.dialogreturnvaluecallback = function.createdelegate(null, closecallback);     sp.ui.modaldialog.showmodaldialog(options); } 

the problem, querystring supposed me full path of document url not good, messed duplicates when in subsite or site collection.

try solution presented on jan tielens blog posting using current page url in urlaction of sharepoint feature.

hope helps.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -