Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

AppTheory specializes in solutions based on the DotNetNuke platform and has 2 employees on the DotNetNuke Core Team.
  Ads  
Aspose - The .NET & Java component publisher
 


  Sponsors  

Meet Our Sponsors

WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
FCKeditor Project
Salaro -- Skins and more
OnyakTech
CrystalTech Web Hosting™
Webhost4life, specialists in DNN hosting
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Custom Module not loading Javascript file
Previous Previous
 
Next Next
New Post 3/31/2006 3:17 PM
User is offline Web Master
2 posts
www.j24class.org
10th Ranked


Custom Module not loading Javascript file 

Hello,

I have a custom module that references a JavaScript file which is in the installed module directory. I have installed the module on 3 different DNN system (2 @ 3.1 and 1 @ 3.2) and the module works fine. However, on my 4th machine, (DNN 3.2) I get a JavaScript error. I've tracked the problem to the web server or DNN not serving the JavaScript file.

I'm using Page.ResolveUrl("scripts/functions.js") to generate the URL. When the page loads and I view the source of the HTML page, the URL looks correct in the HTML.

E.g. <SCRIPT TYPE="text/JavaScript" SRC="/DesktopModules/MyModule/scripts/functions.js"></SCRIPT>

However, If I copy and paste that URL into my browser, I get a 404 - File Not Found Error.

E.g. http://localhost/DesktopModules/MyModule/scripts/functions.js

If I do the same thing on the machines which are working, the JavaScript file will download. So, I assume it's either a IIS config problem or a DNN problem. Other JavaScript files are working (e.g. the menus on the site work fine). It's just this module which has the problem.

Any suggestions on how to fix this would be greatly appreciated.

Thanks

 
New Post 4/10/2006 1:35 AM
User is offline Vladan Strigo
505 posts
Vladan.Strigo.NET
8th Ranked




Re: Custom Module not loading Javascript file 

did you try:

Page.ResolveUrl("~/DesktopModules/MyModule/scripts/functions.js")

that usually does the trick for me...

 

hope it helps


Thanks,
Vladan Strigo
NETMedia

My website: Vladan.Strigo.NET

Vladan.Strigo.NET: Projects
* Advanced VS2005 development approach - BlankModule
* DNN & Microsoft Ajax best practices guidance

Vladan.Strigo.NET: Resources
* Comprehensive list of DNN 4 Module development resources

 
New Post 4/10/2006 5:06 AM
User is offline Web Master
2 posts
www.j24class.org
10th Ranked


Re: Custom Module not loading Javascript file 

Hi Vladan,

Thank you for your reply.

I solved the problem.  DNN in this case was running on a Win2K server which had the IIS LockDown tool run on it.  The IIS LockDown tool does not allow for periods to be in directory names (e.g. MyCompany.ModuleName).  I had to update the IIS LockDown configuration to allow for periods in directory names.

Thanks,
Michael

 
New Post 4/10/2006 6:15 AM
User is offline Vladan Strigo
505 posts
Vladan.Strigo.NET
8th Ranked




Re: Custom Module not loading Javascript file 

Aha.... well, glad that you solved your problem :)

 


Thanks,
Vladan Strigo
NETMedia

My website: Vladan.Strigo.NET

Vladan.Strigo.NET: Projects
* Advanced VS2005 development approach - BlankModule
* DNN & Microsoft Ajax best practices guidance

Vladan.Strigo.NET: Resources
* Comprehensive list of DNN 4 Module development resources

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Custom Module not loading Javascript file
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


The Forerunner Network
The Forerunner Network consists of a group of Dynamic Website & Interactive Membership Portal hosting services that are managed by Forerunner Communications. Our services span a wide range of markets and enable individuals, organizations and businesses to build and manage dynamic, interactive portals and websites.
The Forerunner Network
ZLDNN.COM
We provide commercial DotNetNuke modules.
www.zldnn.com
DNNhost Scandinavia
SUPER fast QuadCore DELL servers, MSSQL servers, DotNetPanel, daily backup, Check out our customers websites
DNNhost.dk

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP