I have a content editor webpart which references a HTML file

It has the below code



function changeimageurl(imagepath){



<li onclick='changeimageurl("../gallery/_w/Slide1_JPG.jpg")' > "SOME LINK"</li>

This works fine when I directly go to page with url like


But when I click on the quick launch on left side, it is loading page as


When the page loads like this, the changeimageurl function is undefined and the onclick is not working

Can I make the quick launch load the direct page instead of relative page with #/webpages ?

Or is there a work around?


2 Answers 2


You are noticing the URL with _layouts/15/start.aspx because the new feature Minimal Download Strategy is activated on your site.

To know more on how it works you can refer the below links

Introduction to MDS

What is start.aspx in SP 2013

If you don't want _layouts/15/start.aspx to be a part of your URL you need to deactivate Minimal Download Strategy feature available under Site Actions -> Manage Site Features

Note: Minimal Download Strategy is a new framework which is been written to increase the performance of the SharePoint site.

Source: Removing _layouts/15/start.aspx# from the URL on the address bar


As per comments from @wjervis, as an alternative to not disabling MDS functionality you can use RegisterModuleInit() method.

Ref: Register CSR Override on MDS enabled SP2013 site


You can disable the Minimal download strategy feature for the site, located under site settings > Manage site features.

That's what adding the extra string to your URL. ("/_layouts/15/start.aspx#").

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.