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 -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -