Database validate input

Validates input. 

Generates "special" field on the fly.

Also removed the `$(document).ajaxComplete` construct (again?). 
It is called for every ajax request(also on image loads ...) and that is not very good. Moved the stuff to the success-function of the `getFrameData.php`-Request