Sign In  |  Register
 
 DotNetNuke Powered!
DotNetNuke Support Forums

Javascript in Dnn

Rate this topic:

Please Register to post a reply.
Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.

AuthorMessages
InsiteFX
Posts:2



11/10/2007 1:20 AM  

Hi John,

I would like to know how to inject javascript into the head of the default.ascx
I have a custom module that I created that needs javascript in the head tag.
It then uses javascript to setup alot of parameters.

Thanks Ray

 

John Mitchell
Posts:3033



11/10/2007 1:26 PM  

Hi Ray,

This is how I do it:

http://blogs.snapsis.com/CommentView,guid,eef98c82-f54d-480b-8e36-309ca6e406d8.aspx

InsiteFX
Posts:2



11/14/2007 12:21 AM  

Hi John,

This will work for a skin but not for a DNN Module.
I have now figured out how to Inject the swfobject.js script into the DNN Default.aspx page header.
My Media player module is working, but I have one problem, it loads a playlist.xml file and it will not work
unless I give it the complete path including the DRIVE Example (c:/DotNetNuke 470/DesktopModules/IfxMediaPlayer/playlist.xml
Is there a way in DNN to get the complete path with drive this would also require the server drive and path I guess?

Thanks
Ray

 

John Mitchell
Posts:3033



11/14/2007 7:45 AM  

Hi Ray,

I use the method from the blog post in my modules and it works for me.

To get the Physical Path you can use:

Server.MapPath(virtualPath)

RegGFX
Posts:25



11/26/2007 2:08 PM  

I must say that i back this approach of injecting Script into DNN 110%.

I was apart of that original post back then and i still use it down to this day... IT REALLY DOES WORK!!!

I use John's Script Injection process in all my sites.

Please Register to post a reply.
Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.




ActiveForums 3.7
Visit our Store for great DotNetNuke Modules and Skins
DNNMasters Sitemap/Google Sitemap 3.0

Item codeSM3-01
Price$29.00
Product Information 
DotNetNuke CSS NavMenu 3.3 (Developers)

Item codeCSSNM33DEV
Base Price$149.00
Product Information 
Snapsis PageBlaster 3.3.2 for DotNetNuke - Professional Edition

AuthorJohn Mitchell
Base Price$79.00
Product Information