Hey ilef,
Sorry for not getting back to you earlier, but i actually missed your message all that time.
OK to analyze the exact problem, the most simple thing would be to provide me a copy of your generated page, in the situation you described, with the script deactivated.
So that i could see what stops the script to process it correctly.
If you don't want to, for privacy concerns, i'll try to found out what's wrong another way, but it'll take more time.
I hope to hear from you soon then.