Results 1 to 2 of 2

Thread: Javascript not working on sub menu items on DNN site

  1. #1
    Join Date
    Sep 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Javascript not working on sub menu items on DNN site

    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/dynamici...etswitcher.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?

  2. #2
    Join Date
    Oct 2009
    Posts
    845
    Thanks
    14
    Thanked 189 Times in 188 Posts

    Default

    because the "sub menu pages" are located in subdirectories some of the paths are not working, for example this
    Code:
    <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
    http://lrptintranet.com.dnnmax.com/styleswitch.js
    would work no matter where it is located.
    There are also similar problems for the images in the style switcher

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •