Yes, the js is on a .php file. If I put a relative link I get a 403 Forbidden error. I can put the form processing .php file outside PW's directories, but it would be nice to use a PW template. In it, I wanted to have the various validation messages as user editable fields (for multilingual use reasons). So, if I understand correctly, it is not possible to have a PW template (that contains only php) to be called by an ajax request.
Also, thank you all for your time, I am a web designer and my php knowledge is limited, so my questions/explanations may not be very clear!