set form action attribute without full url

This will resolve your problems - passing the parameter via data attribute:

http://forum.shopware.com/discussion/17770/smarty-variable-in-javascript