Sign In  |  Register
 
 
DotNetNuke Support Forums
Javascript in Dnn
Last Post 26 Nov 2007 02:08 PM by RegGFX. 4 Replies.
Printer Friendly
Sort:
PrevPrevNextNext
Please Register to post a reply.
Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
AuthorMessages
InsiteFX
New Member
New Member
Send Private Message
Posts:2

--
10 Nov 2007 01: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
Administrator
Veteran Member
Veteran Member
Send Private Message
Posts:3671
Avatar

--
10 Nov 2007 01:26 PM  
InsiteFX
New Member
New Member
Send Private Message
Posts:2

--
14 Nov 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
Administrator
Veteran Member
Veteran Member
Send Private Message
Posts:3671
Avatar

--
14 Nov 2007 07: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
New Member
New Member
Send Private Message
Posts:29

--
26 Nov 2007 02: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.


Active Forums 4.1
Visit our Store for great DotNetNuke Modules and Skins
DotNetNuke CSS Menu 3.3.6 (single use)

Item codeCSSNM33SU
AuthorJohn Mitchell
Base Price$39.00
Product Information 
DotNetNuke CSS NavMenu 3.3.6 (Developers)

Item codeCSSNM33DEV
Base Price$149.00
Product Information 
DotNetNuke Performance Caching & Compression - PageBlaster 3.3.2 - Professional Edition

AuthorJohn Mitchell
Base Price$59.00
Product Information 
XDAkuna (Web 2.0 CSS XHTML Skin)

AuthorNina Meiers
Price$49.00
Product Information 
XDAmarina Standard

AuthorNina Meiers
Price$49.00
Product Information