Form action path toggle using JS