AnsweredAssumed Answered

Integrate new file in a module

Question asked by Iulia Iulia on Mar 10, 2014

   I added a new button in detailviews of a module, having the attribute onClick="genReg(name, type)". I created this function in a js file. This function (genReg(name, type) )  send the variables to a php file generateReg.php, using json. The file is in module_name folder. In this php file I try to create a new object of modules Reglement (it's a custom module) and add new item in database.  The problem is that it doesn't recognize the path to the module Reglement. I included like this:
 Failed opening required 'modules/Reglement/Reglement.php' 
Paths to my files:
js:  custom/module_name/js/generate.js
php:  custom/module_name/generateReg.php

Which file shall I include in order to recognize all the path?

Thank you