Category: Jquery
-
How to create dynamic json for jplayer dynamic media file type
var jsonmedia = {}; jsonmedia[mediatype] = mediafile; jsonmedia[“poster”] = “/pccas/Uploads/AttachedDoc/Big_Buck_Bunny_Trailer_480x270.png”; $(“#jquery_jplayer_1”).jPlayer({ ready: function () { $(this).jPlayer(“setMedia”, jsonmedia ); }, swfPath: “/js”, supplied: “m4v, ogv,m4a,mp3,mp4”, size: { width: “640px”, height: “360px”, cssClass: “jp-video-360p” }, }); Continue reading
-
Save as json file error in internet explorer
when using asp.net mvc json result return , in internet explorer , save as json file option will come. this can be resolved by // this was previous // return Json(new { sView = msg, IsSuccess = isnsuccs }, JsonRequestBehavior.AllowGet);… Continue reading
-
Form data in jquery and json
var formData = new FormData(); formData.append(“username”, “Groucho”); formData.append(“accountnum”, 123456); // number 123456 is immediately converted to string “123456” // HTML file input user’s choice… formData.append(“userfile”, fileInputElement.files[0]); // JavaScript file-like object… var content = ‘<a id=”a”><b id=”b”>hey!</b></a>’; // the body of… Continue reading
-
Multiple attribute based jquery map with join
How to add multiple attribute based selector and var AllchkIDs = $(‘input[sid=”ChkFlddisp”]’).map(function () { var nval = $(this).val(); // alert(nval); var chkid = ‘input:checkbox[vid=”ChkFlddisp”][value=’ + nval + ‘]’; var ischecked = $(chkid).is(‘:checked’); // alert(ischecked); nval += !$(this).is(‘:checked’) ? ” ASC”… Continue reading