Skip to main content
paulacohen
Participant
July 13, 2020
Question

Web pages built using a Dreamweaver template does not allow javascript functions to run.

  • July 13, 2020
  • 2 replies
  • 273 views

I'm hoping someone can help me. I set up a Dreamweaver template  with an editable area in which I have both an image slider and a content hide/show feature (when you mouse over). When I copy this code into the Dreamweaver template, both work just fine. However, when I create a page from this template and insert these features (the slider is in javascript) into the editable region of the page, they do not work. Somehow, these features are not being run from the style sheet(s) and/pr js files. HELP!!

    This topic has been closed for replies.

    2 replies

    Nancy OShea
    Community Expert
    Community Expert
    July 13, 2020

    Everything outside editable regions is shared with ALL child pages spawned from Template.dwt. 

    Links to scripts & stylesheets should be placed OUTSIDE editable regions, not inside them.

     

    Nancy O'Shea— Product User & Community Expert
    paulacohen
    Participant
    July 13, 2020

    Thanks, Nancy. As far as I know, all the links to the scripts and style sheets are in the header region. I double checked all the links and the directory paths. It works when I put the slider etc.. within the editable region of the template, but it doesn't work on any child pages.

    Cheers,

    Paula

    Legend
    July 13, 2020

    This sounds like the paths to the scripts are incorrect when you make a child page from the template. You did define your website folder in DW at the start of your project, right?

     

    Not many, if any at all now use .dwt templates, they are a bit 1970s and can be the source of many problems.

     

     

    Jon Fritz
    Community Expert
    Community Expert
    July 13, 2020

    It's impossible to say what's wrong with any certainty, without seeing the code in question.

    Could you upload your template, and a child page created from it, to a test location on your server and share a link to it here so we could take a look at the code?

    paulacohen
    Participant
    July 13, 2020

    thanks - I have to host it on my work (university) server, so there's no test site, I don't think. But I will get my husband to post it on his test site and will post the link here. Thanks!