How to find current domain in PrototypeJS? -


sometimes current domain builds , @ other times it's builds.example.com. call ajax request same domain current 1 (so doesn't violate same origin policy). how find current domain? if that's not possible, there other solutions problem?

there's no need find current domain. use partial url:

new ajax.request("/partial-url-without-domain", {     method: "post",     parameters: parameters }); 

Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

javascript - Preserving URL fragment through CAS sign-on -

asp.net mvc - Implementing normal user/pass, Twitter & Facebook auth -