Can't get ejs file

Viewed 2015

I need to call an ejs file in another ejs file and exactly in function but i have always "can not get file" If i do an include file outside the function.It works. But I need to call this ejs file in the function.

<input type = "submit" value = "heure"  id="sub" style="width:120px" onclick="changer()"/>
<input type = "submit" value = "journée" id="sub1" style="width:120px" onclick="changersub1()"/>

 <script type="text/javascript">
    function changersub1()
    {
         document.getElementById("sub1").style.backgroundColor="MistyRose";

         document.getElementById("sub").style.backgroundColor="white";

         window.location = "./index1.ejs";
    } 
 </script>

Do you have any idea please? Thanks

1 Answers
Related