You're using a relative URL.

On Tuesday, October 18, 2011 5:20:54 PM UTC-4, Harshad wrote:
>
> Following is the code that makes the ajax call:
>
>     $.ajax({
>         type: "GET",
>         url: '/devicemanager/default/get_response.json/192.168.1.24/107',
>         success: display_received,
>     });
>
> display_received displays the received information.
>
> The controller simply does the following:
>
> def get_response():
>     ipaddress = request.args[0]
>     port = request.args[1]
>     responses = []
>     rows = db().select(db.responses.ALL)
>     for eachResponse in rows:
>         if eachResponse.ipaddress == ipaddress:
>             responses.append(eachResponse.response)
>             db(db.responses.id==eachResponse.id).delete()
>             db.commit()
>     return dict(responses=responses)
>
> When I make the AJAX call from the same IP as the web server, it works. 
> However, it 404's when using a different machine. Any ideas?
>

Reply via email to