Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Adding javascript to a skinAdding javascript to a skin
Previous
 
Next
New Post
2/23/2006 7:26 AM
 
Hi
I want to add javascript (such as image rollovers etc.) to a skin. But DNN won't allow me to upload .js files. It also won't allow me to add javascript as a code block - the page will not be displayed at all.

Is it possible to use javascript without writing a brandnew module?
 
New Post
2/23/2006 2:51 PM
 

Log in as host

Go to Host Settings

Go to Advanced Settings

Click on Other Settings

Add .js to File Upload Extensions

Update

Now you can upload your skin with .js

 


Beautiful patio umbrellas
 
New Post
2/23/2006 4:29 PM
 

You could also achieve this without security compromise by using FTP.  Changing the approved uploads is definitely another way, but this should be done with consideration.  Part of the reason we have this function helps make DNN quite a secure site since you can't upload anything malicious and restrict what users can do to their own site.

I was looking for something that might also be a solution - I saw some injectors - (not car ones - we have a few around in my office!!)  but text injectors - that are modules that allow you to put in non standard functionality without compromising any upload function of the site.

So I suppose if you have host access, you most likely have ftp access and could work around this in the same manner simply by using ftp to upload the skin.

Nina Meiers


Nina Meiers My Little Website
If it's on DNN, I fix, build, deploy, support,skin, host, design, consult, implement, integrate and done since 2003.
Who am I? Just a city chic, having a crack at organic berry farming.. and creating awesome websites.
 
New Post
2/24/2006 2:57 AM
 

Hi

As nina said there are a few injectors around. Another option is to make a js file and then add that using the header tag input in the page options.

In that js file you drop all your javascript code and then as the final line you put an addevent for the window.onload to call your function

If you need to handle stuff that needs to defiend first and that is not allready avaialble on the pageload you can just keep the js file in the header and  and put in the rest of the script to call your functions in an html module and set that to have no container.

That should do the trick, i did that here :

http://www.schwingnuke.com/default.aspx?tabid=403  ( this is just a script included in the page - it rewrites image and link tags onload to create the lightbox image effect )

http://www.schwingnuke.com/Default.aspx?tabid=406 ( this one has script that needs to be run after the elements are fully created so as you can see i added my scriipt block into a text html module )

Armand

 

 

 
New Post
5/17/2006 10:51 AM
 

I have been reading the thread and have the same problem. Where do I upload the .js file to? and what is the path to reference it? I have put a call to the script in the page settings in the page header tags.

(I have an alert box test in the script and it is not triggering so I know it's not right)

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Adding javascript to a skinAdding javascript to a skin


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, 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 DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out