Click here to Skip to main content
15,302,501 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: Creating a JSON body payload in plain JavaScript [solved] Pin
jkirkerx27-Mar-21 10:52
professionaljkirkerx27-Mar-21 10:52 
GeneralRe: Creating a JSON body payload in plain JavaScript [solved] Pin
intoittendenz29-Mar-21 1:01
Memberintoittendenz29-Mar-21 1:01 
QuestionCannot figure out what code lines does mean ... Pin
Member 1501261727-Mar-21 0:01
MemberMember 1501261727-Mar-21 0:01 
AnswerRe: Cannot figure out what code lines does mean ... Pin
Member 1501261727-Mar-21 0:03
MemberMember 1501261727-Mar-21 0:03 
AnswerRe: Cannot figure out what code lines does mean ... Pin
Peter_in_278027-Mar-21 0:54
professionalPeter_in_278027-Mar-21 0:54 
GeneralRe: Cannot figure out what code lines does mean ... Pin
Member 1501261727-Mar-21 21:40
MemberMember 1501261727-Mar-21 21:40 
GeneralRe: Cannot figure out what code lines does mean ... Pin
Member 150126178-Apr-21 22:49
MemberMember 150126178-Apr-21 22:49 
AnswerRe: Cannot figure out what code lines does mean ... Pin
Richard Deeming28-Mar-21 22:29
mveRichard Deeming28-Mar-21 22:29 
There are two different things called data in that code snippet:
  • The data: property of the object passed to jQuery's ajax method[^], which contains the serialized[^] form data; and
  • The data parameter passed to the success callback, which represents the parsed response returned from the server.

It might make things easier to understand if you renamed the parameter:
JavaScript
type: 'POST',
url: $("#relpath").val() + 'sendmailcvalidation.php',
data: $("sendmail").serialize(),
success: function(responseFromServer) {
    responseFromServer = responseFromServer.trim();
    if (responseFromServer === "false") {
        ...
    }
    else if (responseFromServer === "badcaptcha") {
        ...
    }
}




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

GeneralRe: Cannot figure out what code lines does mean ... Pin
Member 150126178-Apr-21 22:49
MemberMember 150126178-Apr-21 22:49 
QuestionRedirect with (Page Visibility API) Pin
ab smine19-Mar-21 10:38
Memberab smine19-Mar-21 10:38 
QuestionNode-Schedule Module Can't Cron Job Scheduled Long Time Pin
Barış KAHRAMAN19-Mar-21 10:02
MemberBarış KAHRAMAN19-Mar-21 10:02 
QuestionCalculation in javascript Pin
Krasimir Dermendzhiev16-Mar-21 3:31
MemberKrasimir Dermendzhiev16-Mar-21 3:31 
AnswerRe: Calculation in javascript Pin
Richard Deeming16-Mar-21 4:39
mveRichard Deeming16-Mar-21 4:39 
GeneralRe: Calculation in javascript Pin
Krasimir Dermendzhiev16-Mar-21 21:36
MemberKrasimir Dermendzhiev16-Mar-21 21:36 
GeneralRe: Calculation in javascript Pin
Krasimir Dermendzhiev30-Mar-21 4:22
MemberKrasimir Dermendzhiev30-Mar-21 4:22 
QuestionJavascript CSP and CORS problem? How can I send Cookies with AJAX in CORS? Pin
Member 1510027614-Mar-21 21:50
MemberMember 1510027614-Mar-21 21:50 
AnswerRe: Javascript CSP and CORS problem? How can I send Cookies with AJAX in CORS? Pin
Richard Deeming14-Mar-21 22:39
mveRichard Deeming14-Mar-21 22:39 
GeneralRe: Javascript CSP and CORS problem? How can I send Cookies with AJAX in CORS? Pin
Member 1510027614-Mar-21 23:11
MemberMember 1510027614-Mar-21 23:11 
GeneralRe: Javascript CSP and CORS problem? How can I send Cookies with AJAX in CORS? Pin
Richard Deeming14-Mar-21 23:29
mveRichard Deeming14-Mar-21 23:29 
GeneralRe: Javascript CSP and CORS problem? How can I send Cookies with AJAX in CORS? Pin
Member 1510027615-Mar-21 7:56
MemberMember 1510027615-Mar-21 7:56 
GeneralRe: Javascript CSP and CORS problem? How can I send Cookies with AJAX in CORS? Pin
Richard Deeming15-Mar-21 22:31
mveRichard Deeming15-Mar-21 22:31 
GeneralRe: Javascript CSP and CORS problem? How can I send Cookies with AJAX in CORS? Pin
Member 1510027616-Mar-21 6:49
MemberMember 1510027616-Mar-21 6:49 
Questionif statement not working Pin
chizzy4211-Mar-21 7:53
Memberchizzy4211-Mar-21 7:53 
AnswerRe: if statement not working Pin
NotTodayYo11-Mar-21 8:24
MemberNotTodayYo11-Mar-21 8:24 
AnswerRe: if statement not working Pin
W Balboos, GHB11-Mar-21 8:45
mveW Balboos, GHB11-Mar-21 8:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.