On Tue, Apr 7, 2015 at 7:04 PM, Larry Martell <
larry....@gmail.com> wrote:
> On Tue, Apr 7, 2015 at 5:40 PM, Larry Martell <
larry....@gmail.com> wrote:
>> I have a model and I want to have this behaviour in admin:
>>
>> 1. Only the add button is shown.
>> 2. When the user clicks the add button, it brings up the standard
>> page, but with just 1 custom button shown.
>> 3. When the user clicks that custom button, I execute an ajax call and
>> display the results below the add div, and this page is shown until
>> the user clicks a button.
>>
>> I have all this coded, but I am facing the following problems:
>>
>> 1. I am not getting the response back from my ajax call. In the Chrome
>> developers tools, in the network tab for this request, in the
>> Status/Text column, it says "(cancelled)" - not sure what that means.
>> If I run the same request from my browser I do get a response. On the
>> server side I am getting 'error: (32, 'Broken pipe')' Googling that
>> revealed that it's because the browser has already moved on, so there
>> is nothing to receive the response. I've tried setting the timeout to
>> a large value, but no joy. How can I get it to wait for the response?
>
> I solved the above issue - I was not returning false from the onclick
> hander. Once i did that I started getting the response.
>
>
added to the database. Anyone know how to do that?