I got 
 "Failed to load resource: the server responded with a status of 404 (NOT 
FOUND) https://10.20.0.10/erpdraft1/default/removeProduct";
I could not see any code which is calling 
for erpdraft1/default/removeProduct, the correct address, where the actual 
remove code is, is erpdraft1/product/removeProduct
Im trying to figure this out. 

BTW, the removeProduct()

def removeProduct():
    pid = request.args(0, cast=long)
    form = crud.delete(db.product,pid)
    response.js = 'document.getElementById("product%s" %request.args(0, 
cast=int)).remove();'





On Monday, May 16, 2016 at 2:28:03 PM UTC+2, Manuele wrote:
>
> Do you get any output in the browser console? Maybe some error in the 
> javascript code passed in the header response?
>
> Cheers
>
>     M.
>
> Il 16/05/16 12:23, Vic Ding ha scritto:
>
> Hi Manuele, 
> Tried the later one. Did not work for me. 
>
>
> <https://lh3.googleusercontent.com/-K5C1uw54dM4/Vzmfc4xTbuI/AAAAAAAAHv0/lRnRpSbL6UM8sygk7lVIJML3lXmJ-GyhgCLcB/s1600/Screen%2BShot%2B2016-05-16%2Bat%2B12.19.30.png>
> The delete button flipped to "working..." for split second then back to 
> delete. I get a flash message says record deleted, but the div is still 
> not. I even tried to hard code the div id in the response.js, did not do 
> the trick either. 
>
> Any other idea?
>
> Cheers,
> Vic
>
> On Monday, May 16, 2016 at 11:54:33 AM UTC+2, Manuele wrote: 
>>
>> Il 16/05/16 11:52, Manuele Pesenti ha scritto:
>>
>> response.js = " document.getElementById("product%s" % request.args(0, 
>> cast=int)).remove();"
>>
>> uhm try this one instead:
>>
>> response.js = 'document.getElementById("product%s" % request.args(0, 
>> cast=int)).remove();'
>>
>>     M.
>>
> -- 
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> --- 
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to web2py+un...@googlegroups.com <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to