View Full Version : Javascript not working on sub menu items on DNN site

09-14-2010, 07:04 PM
Hi, I really need urgent help. I am using a javascript on a DotNetNuke CMS site to allow the user to choose text/background colour, basically it changes stylesheets. Here is the code that I have used: http://www.dynamicdrive.com/dynamicindex9/stylesheetswitcher.htm and here is my example: http://lrptintranet.com.dnnmax.com/ - you can see the colour image buttons top right under the main menu. The style sheet changer seems to work on the top menu level items but as soon as you choose a submenu the javascript doesn't seem to work. I don't know anything at all about javascript - can anyone offer any advice how I can get this working on the sub menu pages?

09-14-2010, 08:28 PM
because the "sub menu pages" are located in subdirectories some of the paths are not working, for example this

<script src="styleswitch.js" type="text/javascript">

so either you need to edit the path in the individual sub pages or you can use an absolute path on all pages, meaning that this
would work no matter where it is located.
There are also similar problems for the images in the style switcher