strange problem with dajaxice and javascript

23 views
Skip to first unread message

cingusoft

unread,
Oct 22, 2012, 8:24:03 PM10/22/12
to django...@googlegroups.com
hi all

i have a javascript callback function that return a data json string from a dajaxice view

this is the callback function

function message_callback(data){
    alert(data.id);
    var id_book = data.id;
    var uploader = $('#uploader').pluploadQueue({
            url : '/admin/ecommerce/books/images/upload/'+id_book.toString()+'/'
    });
    ...........

the aleet return the correct id number
but the url is : /admin/ecommerce/books/images/upload/undefined

have someting wrong?
sorry if you think this is a stupid question but i have lost a lot of time googleing this problem without any result

have a nice day

Michael J Kaye

unread,
Oct 23, 2012, 6:02:49 AM10/23/12
to django...@googlegroups.com
Hi,

On 23/10/12 01:24, cingusoft wrote:
> i have a javascript callback function that return a data json string
> from a dajaxice view
>
> this is the callback function
>
> function message_callback(data){
> alert(data.id);
> var id_book = data.id;
> var uploader = $('#uploader').pluploadQueue({
> url :
> '/admin/ecommerce/books/images/upload/'+id_book.toString()+'/'
> });
> ...........
>
> the aleet return the correct id number
> but the url is : /admin/ecommerce/books/images/upload/undefined
>
> have someting wrong?

I think your issue is with the JavaScript, so you may get better answers
elsewhere.

I suggest you use FireBug to step through your callback and check the
type and value of the relevant variables at each step.

If that doesn't help, could you reply with some information about your
dajaxice view and what it returns?

Regards,
--
Michael J Kaye
www.software.coop �good thinking

--
I'm not a Microsoft customer so, although my software will
open Microsoft documents you send, I can't guarantee that the
formatting will be correct or all the content will be visible.

http://www.documentfreedom.org/testimonials.en.html
Reply all
Reply to author
Forward
0 new messages