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  |  

Vote for DotNetNuke as your choice for winner of this year's PackT Open Source CMS Award
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
OnyakTech
 


  Sponsors  

Meet Our Sponsors

Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
SmarterTools
The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
Red-Gate Software
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  include js file from module?
Previous Previous
 
Next Next
New Post 2/21/2008 7:28 AM
Unresolved
User is offline onishiro
134 posts
9th Ranked


include js file from module? 
Modified By onishiro  on 2/21/2008 11:36:20 AM)

I have a module and I need to include a js file.

I'm using the following code, but it can't find it:

[code]**filtered** type="text/javascript" language="javascript" src="~/js/helper.js">[/code]

How can I include the file which is in the dotnetnuke js/ directory?

Thanks

 

 

 
New Post 2/21/2008 7:33 AM
User is offline MH
14 posts
10th Ranked


Re: include js file from module? 

Here is the code I use within the codebehind. (C#)

                modPath = this.ModulePath;
                if (!Page.ClientScript.IsClientScriptIncludeRegistered("calendarDateInput"))
                    Page.ClientScript.RegisterClientScriptInclude("calendarDateInput", modPath + "calendarDateInput.js");

Note that this loads a JS that is in the same directory as the module (modPath) and puts it in the same place that DNN does (Not in the head, but at the top of the form). In addition, if you have more than one instance of said module on a page, this will ensure that the Javascript get's loaded only once.

 
New Post 2/21/2008 9:30 PM
User is offline Agung Riyadi
100 posts
9th Ranked


Re: include js file from module? 

Maybe this link will help you : http://blogs.snapsis.com/PermaLink,guid,eef98c82-f54d-480b-8e36-309ca6e406d8.aspx

I used it since one year ago.

HTH.

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  include js file from module?
 


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.

 


Code Endeavors, LLC
Do you Endeavor to Enhance your DotNetNuke designs by utilizing AJAX technologies to more efficient interactive web experiences
www.codeendeavors.com
T-WORX, INC.
Professional DotNetNuke Solutions
www.t-worx.com
AppTheory
Professional development for medium to large projects based on the DotNetNuke platform.
www.apptheory.com

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