showURL.js
// This takes care of data once returned from Server:
This takes care of data once returned from Server.
This takes care of data once returned from Server .
function processTakeURLData(returnedstuff ) {
var response = JSON.parse(returnedstuff);
badWurst = response.badWurst;
badFormfield = response.badFormfield;
mailSent = response.mailSent;
enterNewTopic = response.enterNewTopic;
enterNewPost = response.enterNewPost;
topicID = response.topicID;                                     
badCredentials = response.badCredentials;
postNumber = response.postNumber;
if (badWurst === true) {Swal("The eBay item URL wasn't accepted by the server!\nPlease check the page you're submitting this off of! Then try again!")}
if (badFormfield === true) { Swal({
  title: '<strong>A form field wasn\'t filled out correctly!</strong>',
  text: 'One of your form fields has an incorrect number of- (or kind of) characters, e.g. a period or a colon etc.. Please check and correct! Then try again!',
  focusConfirm: true,
  confirmButtonText: '<i class="fa fa-thumbs-up"></i> I\'ll do that!',
  confirmButtonAriaLabel: 'Thumbs up, great!',
})   }        
if (mailSent === true) { Swal({
  title: 'e-Mail has been sent!',
  text: 'We have sent you an eMail with your credentials. Please check your inbox. If it\'s not there it may be in the Spam directory?',
  focusConfirm: true,
  confirmButtonText: '<i class="fa fa-thumbs-up"></i> Cool! Can\'t wait to use this!',
  confirmButtonAriaLabel: 'Thumbs up, great!',
})   }        
if (enterNewTopic === true) { Swal({
  title: '<strong>Your entry has been added to this item!</strong>',
  html: '<a href="http://altcon.altconsys.com/t/-/'+topicID+'">Click here to follow up or discuss this further</a>',
  focusConfirm: true,
  confirmButtonText: '<i class="fa fa-thumbs-up"></i>Cool, I love it!',
  confirmButtonAriaLabel: 'Thumbs up, great!',
})   }
if (enterNewPost === true) { Swal({
  title: '<strong>Your entry has been addedd to this item!</strong>',
  html: '<a href="http://altcon.altconsys.com/t/-/'+topicID+'">Click here to follow up or discuss this further</a><br>' + 'Posts: <b>'+postNumber+'</b>',
  focusConfirm: true,
  confirmButtonText: '<i class="fa fa-thumbs-up"></i> Cool, I love it!',
  confirmButtonAriaLabel: 'Thumbs up, great!',
})   }
if (badCredentials === true) { Swal({
  title: '<strong>Wrong Credentials?<br> Limitations violated?</strong>',
  text: 'Your access credentials are wrong and/or you have violated one or more limitations. Please check and correct! Then try again!',
  focusConfirm: true,
  confirmButtonText: '<i class="fa fa-thumbs-up"></i> I\'ll do that!',
  confirmButtonAriaLabel: 'Thumbs up, great!',
})   }
}
function processTakeURLData ( returnedstuff ) { var response = JSON . parse ( returnedstuff ) ; badWurst = response . badWurst ; badFormfield = response . badFormfield ; mailSent = response . mailSent ; enterNewTopic = response . enterNewTopic ; enterNewPost = response . enterNewPost ; topicID = response . topicID ; badCredentials = response . badCredentials ; postNumber = response . postNumber ; if ( badWurst === true ) { Swal ( "The eBay item URL wasn't accepted by the server!\nPlease check the page you're submitting this off of! Then try again!" ) } if ( badFormfield === true ) { Swal ( { title : '<strong>A form field wasn\'t filled out correctly!</strong>' , text : 'One of your form fields has an incorrect number of- (or kind of) characters, e.g. a period or a colon etc.. Please check and correct! Then try again!' , focusConfirm : true , confirmButtonText : '<i class="fa fa-thumbs-up"></i> I\'ll do that!' , confirmButtonAriaLabel : 'Thumbs up, great!' , } ) } if ( mailSent === true ) { Swal ( { title : 'e-Mail has been sent!' , text : 'We have sent you an eMail with your credentials. Please check your inbox. If it\'s not there it may be in the Spam directory?' , focusConfirm : true , confirmButtonText : '<i class="fa fa-thumbs-up"></i> Cool! Can\'t wait to use this!' , confirmButtonAriaLabel : 'Thumbs up, great!' , } ) } if ( enterNewTopic === true ) { Swal ( { title : '<strong>Your entry has been added to this item!</strong>' , html : '<a href="http://altcon.altconsys.com/t/-/' + topicID + '">Click here to follow up or discuss this further</a>' , focusConfirm : true , confirmButtonText : '<i class="fa fa-thumbs-up"></i>Cool, I love it!' , confirmButtonAriaLabel : 'Thumbs up, great!' , } ) } if ( enterNewPost === true ) { Swal ( { title : '<strong>Your entry has been addedd to this item!</strong>' , html : '<a href="http://altcon.altconsys.com/t/-/' + topicID + '">Click here to follow up or discuss this further</a><br>' + 'Posts: <b>' + postNumber + '</b>' , focusConfirm : true , confirmButtonText : '<i class="fa fa-thumbs-up"></i> Cool, I love it!' , confirmButtonAriaLabel : 'Thumbs up, great!' , } ) } if ( badCredentials === true ) { Swal ( { title : '<strong>Wrong Credentials?<br> Limitations violated?</strong>' , text : 'Your access credentials are wrong and/or you have violated one or more limitations. Please check and correct! Then try again!' , focusConfirm : true , confirmButtonText : '<i class="fa fa-thumbs-up"></i> I\'ll do that!' , confirmButtonAriaLabel : 'Thumbs up, great!' , } ) } }
This takes care of data once returned from Server:
This takes care of data once returned from Server :
/*}textStatus, jqXHR*/ // console.log(returnedstuff); //	var response = returnedstuff; //	console.log("this here is the JSONparsed response:"); // console.log(response);      // badSenf = response.badSenf; //  Wird zum senfURL gebraucht // if (badSenf === true) {alert("Die URL-Addresse des Senfes wurde vom Server nicht akzeptiert!\nBitte korrigieren Sie und dann versuchen Sie's nochmal!")} // type: 'error', // type: 'success', // type: 'success', // type: 'success', // type: 'error',