Javascript Widget and Handling ~/ URLs

Posted by Community Admin on 04-Aug-2018 21:07

Javascript Widget and Handling ~/ URLs

All Replies

Posted by Community Admin on 18-Feb-2011 00:00

I'm using the SiteFinity Project Manager to build out a template for a client, and so when I start the site, the port number seems to be random, thus, my Javascript file references added to the site template don't resolve.

The Javascript Widget, doesn't accept ~/ in the specified javascript url, and I can't use, for example '/JS/include.js' because that gives me the root localhost site of http://localhost:xxxx/ instead of localhost:xxxx/.../
I was a little surprised that it couldn't resolve to site root with the standard .NET notation.

Posted by Community Admin on 22-Feb-2011 00:00

Hello Chris,

Thanks for your feedback. We will log this and will improve the widget. 
You have two options from here:
1. Move the site to IIS, and run it on fixed port or
2. Use the following control - http://www.sitefinity.com/40/help/developer-manual/controls-utility-controls-resourcelinks-control.html

I hope this helps.

Best wishes,
Georgi
the Telerik team

This thread is closed