xotj123 Feb 4, 2013 at 4:44 PM Hi, Im trying to add a reference to a script in the layout.cshtml, and am getting errors. I am running 1.6, have uploaded the script to a folder under my theme called "Scripts." My script is jquery.thumbnailScroller.js When I add it using Script.Require it says it cant be found. I added the full path and the same thing. Any ideas? Regard, TJ Havens bertrandleroy Coordinator Feb 10, 2013 at 7:17 AM You're missing a web.config in the script's directory. xotj123 Feb 10, 2013 at 5:33 PM I already added that and continue to get the same thing, here is my web.config, do you see anything I haven't done right?      xotj123 Feb 10, 2013 at 5:41 PM Keep getting same error: A 'script' named 'jquery.thumbnailScroller.js' could not be found. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidOperationException: A 'script' named 'jquery.thumbnailScroller.js' could not be found. Source Error: Line 13: Line 14: @Html.Title(title, siteName) Line 15: @Display(Model.Head) Line 16: Line 17: Source File: c:\HostingSpaces\taxtitle\beta.taxtitleservices.com\wwwroot\Core\Shapes\Views\Document.cshtml Line: 15 xotj123 Feb 10, 2013 at 6:59 PM Bertrand, I sued the technique from your blog to create a widget and added it to my views folder using the designer tools. Below is the code I have added attempting to get the Scroller working: @Display(Model.Content)
 bertrandleroy Coordinator Feb 10, 2013 at 7:42 PM Oh, that's easy then: you used a relative URL. If you are on page /foo/bar, this src="Themes/TTS/Scripts/jquery.thumbnailScroller.js" is going to be looked for in "/foo/bar/Themes/TTS/Scripts/jquery.thumbnailScroller.js". Always use Script.Include: @{Script.Include("jquery.thumbnailScroller.js")} should do the trick. xotj123 Feb 10, 2013 at 7:46 PM Where do I add it? Here is my code now and I get an error: @Display(Model.Content) @{Script.Include("jquery.thumbnailScroller.js")};
 bertrandleroy Coordinator Feb 10, 2013 at 7:54 PM What error? xotj123 Feb 10, 2013 at 7:56 PM  Server Error in '/' Application. -------------------------------------------------------------------------------- Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS1002: ; expected Source Error: Line 1: @Display(Model.Content) Line 2: @{Script.Include("jquery.thumbnailScroller.js")}; Line 3:
Source File: c:\HostingSpaces\taxtitle\beta.taxtitleservices.com\wwwroot\Themes\TTS\Views\Widget-PartnerLogoScroller.cshtml Line: 2 Show Detailed Compiler Output: Show Complete Compilation Source: bertrandleroy Coordinator Feb 10, 2013 at 8:10 PM Yeah, well, sorry, should have been @{Script.Include("jquery.thumbnailScroller.js");} You may also want to change that inline script to a using(Script.Foot()) {... Look for examples in the code. xotj123 Feb 10, 2013 at 9:14 PM Still not working, and it breaks the Featured Item Slider... Hmm, what a pain... I have an example of the logo slider here on a static site: http://www.aanmt.com/backup/tts/, its near the bottom, with the logos, on hove it shows arrows and lets you scroll through them... hmm, how to get it to work? bertrandleroy Coordinator Feb 10, 2013 at 9:21 PM You really need to be more specific. I can't read your mind. ;) When you say "still not working" I cannot possibly guess how it's not working, so there is no way I can help. Also, if the script you're including is interacting negatively with another script on your page, I think you will have to debug that yourself, or contact the authors of the respective scripts. xotj123 Feb 24, 2013 at 5:17 PM ok, still working on this. I have the web.config located in the Scripts folder of my theme. I am trying everything, any help would be appreciated. I get the error: SCRIPT438: Object doesn't support property or method 'thumbnailScroller' beta.taxtitleservices.com, line 637 character 2 Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains. And below is my widget code: @{Script.Include("jquery.thumbnailScroller.js");} @Display(Model.Content)  BertrandLeRoy Coordinator Feb 24, 2013 at 6:07 PM Looks like your script is still not loading. Use your browser's dev tools (network panel) to figure out why.