# Ajax request not coming

**URL:** <https://www.ruby-forum.com/t/ajax-request-not-coming/196013>\
**Category:** Rails\
**Created:** [October 5, 2010, 2:08pm UTC](https://www.ruby-forum.com/t/ajax-request-not-coming/196013 "2010-10-05T14:08:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [October 5, 2010, 2:08pm UTC](https://www.ruby-forum.com/t/ajax-request-not-coming/196013/1 "2010-10-05T14:08:02Z")

</div>

Hello guys,

I am sending an ajax request in javascript with some parameters. Ajax  
request is javascript is written as:-

new Ajax.Request( ‘/controllername/actionname?employee\_id=’ +  
employee\_id + ‘&employee\_name=’ + emp\_name + some\_more\_parameters,  
{ asynchronous:true, evalScripts:true,  
onFailure: function(transport)  
{  
alert(“Server was down while performing this action. Please  
contact administrators.”);  
}  
});

Now what is happening is that if i run this code on my local machine, it  
works fine but if i try to run this on my server(production mode), ajax  
request is not coming in log files. Also when i give breakpoints in  
chrome to see what is going on then ajax request is coming fine but  
without it, its not coming.

So cases are:-

1. Coming in local machine.
2. Coming in production mode when i give breakpoints in server.
3. Coming in production mode when i give onSuccess in request as well.
4. But request is not coming if i simply call it.

So can you guys tell me what is going on over here. Can not figure out  
from so much time. :’(

---

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [October 5, 2010, 4:52pm UTC](https://www.ruby-forum.com/t/ajax-request-not-coming/196013/2 "2010-10-05T16:52:18Z")

</div>

If you click on the resources tab in the developer tools and scroll to  
the bottom, you should see an entry for the ajax request. If you don’t,  
the request isn’t firing. If you do, the response will give you some  
valuable troubleshooting information.

Luke
