# Link\_to\_remote

**URL:** <https://www.ruby-forum.com/t/link-to-remote/144671>\
**Category:** Rails\
**Created:** [August 1, 2008, 2:25am UTC](https://www.ruby-forum.com/t/link-to-remote/144671 "2008-08-01T02:25:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bishal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/a698b9/32.png) [@bishal](https://www.ruby-forum.com/u/bishal)\
**Post date:** [August 1, 2008, 2:25am UTC](https://www.ruby-forum.com/t/link-to-remote/144671/1 "2008-08-01T02:25:55Z")

</div>

Link\_to\_remote problems…

The above ajax call is not working for me. whenever i make a call to the  
same server using this command i am able to get the response, but when i  
try to make a similar call to a different uri located on a different  
computer or different port it is not working…Am I missing something  
.Can anybody help ?

 Ajax Demo \<%= javascript\_include\_tag "prototype" %\> 
# What time is it?

 I don't have the time, but \<%= link\_to\_remote( "click here", :update =\> "time\_div", :url =\>'http://localhost:3000/posts',:method=\>"get") %\> and I will look it up. 

The call works but when i change the url to something else like  
[http://localhost:3000/posts](http://localhost:3000/posts) then its is not working ???

---

<div class="post-metadata">

**Author:** ![bishal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/a698b9/32.png) [@bishal](https://www.ruby-forum.com/u/bishal)\
**Post date:** [August 1, 2008, 2:50am UTC](https://www.ruby-forum.com/t/link-to-remote/144671/2 "2008-08-01T02:50:02Z")

</div>

sorry the second url above was http;[//localhost:3001/posts](https://localhost:3001/posts) that meant  
now i am requesting to another server application may be on a different  
machine…Why am I not getting the response

---

<div class="post-metadata">

**Author:** ![bishal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/a698b9/32.png) [@bishal](https://www.ruby-forum.com/u/bishal)\
**Post date:** [August 1, 2008, 2:58am UTC](https://www.ruby-forum.com/t/link-to-remote/144671/3 "2008-08-01T02:58:13Z")

</div>

Bishal A. wrote:

> sorry the second url above was http;[//localhost:3001/posts](https://localhost:3001/posts) that meant  
> now i am requesting to another server application may be on a different  
> machine…Why am I not getting the response

That’s a security feature in the web browser. Google “cross domain ajax”  
for details and workarounds.

---

<div class="post-metadata">

**Author:** ![bishal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/a698b9/32.png) [@bishal](https://www.ruby-forum.com/u/bishal)\
**Post date:** [August 1, 2008, 4:11am UTC](https://www.ruby-forum.com/t/link-to-remote/144671/4 "2008-08-01T04:11:06Z")

</div>

Thanx very much your single suggestion saved lot of time for me. The  
problem is solved.

---

<div class="post-metadata">

**Author:** ![bishal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/a698b9/32.png) [@bishal](https://www.ruby-forum.com/u/bishal)\
**Post date:** [August 1, 2008, 3:35am UTC](https://www.ruby-forum.com/t/link-to-remote/144671/5 "2008-08-01T03:35:20Z")

</div>

Jeremy Weiskotten wrote:

> Bishal A. wrote:
> 
> > sorry the second url above was http;[//localhost:3001/posts](https://localhost:3001/posts) that meant  
> > now i am requesting to another server application may be on a different  
> > machine…Why am I not getting the response
> 
> That’s a security feature in the web browser. Google “cross domain ajax”  
> for details and workarounds.

Thank You very much it helped me understand more…
