While dynamically I am complying with bootstrap rating control, not affected by rating class jquery GetReviewTypeForRating (hallIDFReview) {$ .ajax ({url: '@ Url.Action ("GetReviewRatingTypes")
My Jquery Code , "PublicUser"), Content Type: "Application / Jason; Charset = UTF-8", Datatype: "Jason", Data: "{'obj': '" + + hallIDFReview + "'}", type: Post "// 'GET' or 'POST' ('GET' is the default) Success: Function (Data) {if (Data! =" No review ("Data"); {divas = " Line "> '+ item. description +' & lt; / label & gt; & lt; / div & gt; ; & Lt; / Div & gt; & Lt; Div class = "col-lg-3" & gt; & Lt; / Div & gt; & Lt; / Div & gt; '; }); $ ('# RevieTypeRatings' gt 'div') Remove (); $ ('# RevieTypeRatings & gt; br') Remove (); $ ('# RevieTypeRatings') attached (divTr). }}, Error: function (ax, position, error) {var err = eval ("(" + + xhr.responsetext + ")"); Warning (err.Message); }}); }
See wrapping your AJAX request in $. When and after the success code, write in. As the following:
GetReviewTypeForRating function (hallIDFReview) {var Valid = incorrect; Var datainfo = ""; $ When ($ .jax ({url: '@ Url.Action ("GetReviewRatingTypes", "PublicUser"), Content Type: "Application / Jason; Charset = UTF-8", Datatype: "Jason", Data: "{ Type 'Obj': '"+ hallIDFReview +"'} ", type:" post ", // 'GET' or 'POST' (default is 'received'): function (data) {if (data! Not a review ") {dataInfo = JSON.parse (data); console.log (data); valid = true;}}, error: function (xhr, position, error) {var err = eval (" ("(" (" + Xhr;) (warning (err.Message);}}). Then (function () {if (valid) {var divTr = ''; $ .each (datainfo, function (i, item) {DivTr + = '& Lt; div class = "row" & gt; div class = "col-lg-4"> ' + item description. '& Lt; / label & gt; Lt; / div & gt; & lt; Div class = "Colonel-LG-5" & gt; & lt; div class = "form-group input-group-sm" & gt; & lt; input id = "starholling '+ Item.id +' "value =" 0 "type =" number "class =" rating "min = 0 maximum = 5 steps = 1 data-size =" xs "& gt; & lt; / div & gt; & Lt; / div & gt; & lt; div class = "col-lg-3" & gt; & Lt; / Div & gt; & Lt; / Div & gt; '; }); $ ('# RevieTypeRatings' gt 'div') Remove (); $ ('# RevieTypeRatings & gt; br') Remove (); $ ('# RevieTypeRatings') attached (divTr). } // if (valid) pass}}; }
No comments:
Post a Comment