ajax - "Uncaught SyntaxError: Unexpected token <" while using $.load jquery -


i using $("#selector").load("url") load partial view selector element 1 below:

$("#body_data").load("/admin/getuploadvideos", initializevideodetails); 

and admincontroller actionmethod

public actionresult getuploadvideos() {     return partialview("_uploadvideos"); } 

but getting "uncaught syntaxerror: unexpected token <" in console. no issues in loading partialview console error bit irritating.

i not sure why happening. went through different links this one no problem wasn't mentioned $("#selector").load event. there format has specified while loading partialviews using .load or way left load partialviews using $.ajax? information appreciated.


update

tried @shaunakd's suggestion, getting successful response view not getting appended selector , console error still exists

$.ajax({           url:'/admin/getuploadvideos',           datatype:'html',           type:'get',           success:function(result){                  $("#body_data").append($.parsejson(result));                  initializevideodetails()           },           error:function(result){                  toastr.error("error loading view","error");           } }) 

when console.log(result) done on success getting html of partialview in console not appended selector


Comments