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  |  

Affordable ASP.NET Hosting Service
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
r2i.ntegrated
 


  Sponsors  

Meet Our Sponsors

Webhost4life, specialists in DNN hosting
Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
MadCap Software, Inc.
AspDotNetStoreFront - E-Commerce by Design - The Leading ASP.NET shopping cart platform for developers!
Click here to go to dev.live.com for Windows Live developer resources
SteadyRain
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! (Pro...  javascript files in a custom dotnetnuke module
Previous Previous
 
Next Next
New Post 5/5/2008 2:21 PM
User is offline Dave Amphlett
3 posts
www.amphlett.net/Dave.aspx
10th Ranked


javascript files in a custom dotnetnuke module 

I'm developing my own modules, and have some clientside scripting (javascript) that I've pulled out into seperate .js files (rather than confusing the .aspx files, and thus also allowing me to share javascript code between aspx's). What I can't figure out is how I should be 'including' the javascript files.

Worst case scenario is that I add a script link to the top of each .aspx file (which could be wasteful if there are multiple instances of the module on a page), but I can't figure out what path to put in the <script src=....  tag. I'm happy to put the js files in the common js directory, or in one for my module, but how do I figure out the base path of the portal?

More ideally I'd be able to say that this module requires the following javascript files (sort of .js dependencies) and have the script tags injected into the top of the page automagically.

You're thoughts / suggestions / recommendations very much appreciated.

 

Regards,

Dave Amphlett

 

 
New Post 5/5/2008 3:34 PM
User is offline Michael Washington
2535 posts
ADefWebserver.com
5th Ranked










Re: javascript files in a custom dotnetnuke module 

Like this:

Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "Silverlight", (this.TemplateSourceDirectory + "/Silverlight.js"));

see:

http://dnnsilverlight.adefwebserver.com/Silverlight10/StartHere/tabid/61/Default.aspx



Michael Washington
* ADefWebserver.com
* DNN Module Developer's Guide
* IWEB - DNN Web Services
* Silverlight and DotNetNuke
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! (Pro...  javascript files in a custom dotnetnuke 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.

 


Where Every Home is an Investment
Where Every Home is an Investment
www.nestbrokers.com
Faculty of Graduate and Postdoctoral Studies
At the graduate level, the University of Ottawa offers more than 180 graduate certificates, master's degrees and PhDs, as well as interdisciplinary programs such as Women's Studies and Canadian Studies. Many postdoctoral opportunities are available in both the sciences and the humanities. For further information, please consult the site of the Faculty of Graduate and Postdoctoral Studies.
www.grad.uottawa.ca
Vekkin Solutions
Vekkin Solutions provides complete website solutions and custom module development to churches and small businesses.
www.vekkin.com

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