علی اکبر خانبابائی profile picture

علی اکبر خانبابائی

@user-2759540-1704051870 Tasks followed: 0
Beginner
Joined: December 2023

Latest comments and ratings

علی اکبر خانبابائی profile picture
علی اکبر خانبابائی
Dec 31, 2023
چطور در متود زیر بعد از جواب دادن ajax مقداری را برگردانم از متود یعنی اینکه متود صبر کند تا مقداری از ajax برگردد سپس به راه خود ادامه دهد تمام این ها در jquery است function ajaxBehpardakht(rawPrice/*, tarefelist, etebar, data, totalTarefe*/) { var myJSON1 = '{"ServiceCode" :"1","Amount":"' rawPrice '","PayerId":"","PcID":""}'; var multiaccount = localStorage.getItem('multiaccount'); /* if (multiaccount == "true") { var BofeId = localStorage.getItem('BofeId'); var KhedmatId = localStorage.getItem('KhedmatId'); var myJSON1 = { "ServiceCode": "1", "TotalAmount": rawPrice "", "RequestList": [ { "AccountID": BofeId "", "Amount": etebar "", "PayerID": "0" }, { "AccountID": KhedmatId "", "Amount": totalTarefe "", "PayerID": "0" }, ], "PrintDetail": "1", "PcID": "1234" } } */ var myObj1 = JSON.parse(myJSON1); $.ajax({ type: "POST", contentType: "application/json", //<!-- Access-Control-Allow:*, --> url: "http://localhost:1024/bpmpospc/service", data: myJSON1, crossDomain: true, success: function (obj) { console.log(':: ' obj); var x = (obj.ReturnCode); console.log(":: Result.RespCode :" x); pardakht2(); //var x ="00"; /* if (x == 100) { pardakht2(); } else { ErrorModal(); }*/ } , error: function (xhr, ajaxOptions, thrownError) { ErrorModal(); } }); //ajax }

Help

+ D bookmark this site for future reference
+ ↑/↓ go to top/bottom
+ ←/→ sort chronologically/alphabetically
↑↓←→ navigation
Enter open selected entry in new tab
⇧ + Enter open selected entry in new tab
⇧ + ↑/↓ expand/collapse list
/ focus search
Esc remove focus from search
A-Z go to letter (when A-Z sorting is enabled)
+ submit an entry
? toggle help menu
0 AIs selected
Clear selection
#
Name
Task