Using events  can cause unexpected behavior. Sometime it looks like a change is not working or an error message is presented while generating the code. The most common issues and solutions are presented below:

Generation error in module xxx : event not found in ..


This issue will occur if you generate an event and you have not saved your code, or if you have removed your code, but have not removed the event in the property editor. The fix is easy, remove the event from the component or recreate it and save the source code file.

Ajax event also triggers submit event

This issue will create unexpected results as PHP will trigger a submit form after executing the ajax event. It is caused if you create an ajax event on a button, but do not change the button type from ‘submit’ to ‘button’.


Changes in ajax events does not seem to work.


Depending on the situation you can end up with multiple instances of a function in your JavaScript code. The solution is to clean the code:



If there are duplicate functions then the lines-out are less then the lines-in. Don’t forget to save the code.


I need to revert to the original JavaScript code..

This situation can occur if you modify or write your own JavaScript code. The most simple way Is ot use the magic stick:


To use it: select the event you need to replace by the original:



The selected event shows in blue. Then use the magic wand:



If you click on ‘ok’ then the original function is replaced by the new function (the old one is deleted, the new one appended).

New JavaScript due to new PHsPeed version.

As long as your application works well, there is usually no need to change the JavaScript. Sometimes however – when you want to use new functionality in older projects – you need to refresh the JavaScript side.

This is done by clicking on the compare icon:


It will then show a menu of the used JavaScript, and reports the functions that differ from the original. Uncheck the functions that you don’t want to have replaced and click on Restore to modify the procedures you want.