Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

[SOLVED] Can't exec...
 
Notifications
Clear all

[SOLVED] Can't execute JS in plugin

5 Posts
3 Users
0 Reactions
5,218 Views
(@raihane)
Posts: 4
Active Member
Topic starter
 
[#3290]

Hey everybody !
I'm trying to create a pluging for ProjeQtor, i create the plugingDescriptor.xml and in this .XML a defined that for the event AfterSave a PHP file must be included but i have some problemes i can't execute Javascript in order to add a div to the page for example, the response of the php file appears but it i can't change the DOM for exemple and the JavaScript is not evaluted and not executed execute Javascript code.
I create also a .JS file and he is included with no probleme but i can't call for example some function that's i defined in this JS file.
Can someone please explain to me how to do that.
Thans all for your time.


 
Posted : 15 Apr 2016 23H32
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

Javascipt in Ajax request is not evaluated.
You cannot rely on javascript on this side.

If your js file is correctly included, no doubt you can use the function, unless you defined functions with name already existing in community version.


 
Posted : 17 Apr 2016 20H26
(@raihane)
Posts: 4
Active Member
Topic starter
 

Thanks for you answer, so if i want to use the events like: BeforSave AfterSave etc how should i do that ?
Can you give some advices ?


 
Posted : 17 Apr 2016 21H08
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

PHP Scripts are expected for the events triggered by plugins.


 
Posted : 17 Apr 2016 21H11
(@jounaidihamza)
Posts: 4
Active Member
 

hay raihane i want to create a plugin in projeqtor but I have no idea how to do that, the only thing that I know is that u have to create an XML file. Can you please give me just a simple example of how can I do that. thank you !!


 
Posted : 07 Mar 2017 15H36
Share:

Scroll to Top