Skip to content

Instantly share code, notes, and snippets.

View Octagon-simon's full-sized avatar
Turning red flags into red tests that pass.

Simon Ugorji (Octagon) Octagon-simon

Turning red flags into red tests that pass.
View GitHub Profile
function saveForm(fname, lname, email) {
//Check form fields
if(!fname){
alert('First Name is required');
}else if(!lname){
alert('Last Name is required');
}else if(!email){
alert('Email Address is required');
}else{
//Save form inputs to our Array
function saveForm(fname, lname, email) {
//Check form fields
if(!fname){
alert('First Name is required');
}else if(!lname){
alert('Last Name is required');
}else if(!email){
alert('Email Address is required');
}else{
//Check for duplicate records then save
function saveForm(fname, lname, email) {
//Check form fields
if(!fname){
alert('First Name is required');
}else if(!lname){
alert('Last Name is required');
}else if(!email){
alert('Email Address is required');
}else{
//Check for duplicate records then save
function saveForm(fname, lname, email) {
//Check form fields
if(!fname){
alert('First Name is required');
}else if(!lname){
alert('Last Name is required');
}else if(!email){
alert('Email Address is required');
}else{
//Check for duplicate records then save
<p> You have Saved <span id="inp_count"> </span> records so far </p>
function saveForm(fname, lname, email) {
//Check form fields
if(!fname){
alert('First Name is required');
}else if(!lname){
alert('Last Name is required');
}else if(!email){
alert('Email Address is required');
}else{
//Check for duplicate records then save
/* AJAX FORM SUBMIT */
$('#form_multi_upload').submit(function (event){
event.preventDefault();
var formData = {
fname : fnameArry,
lname : lnameArry,
email : emailArry
};
$.ajax({
function findNotifDate(date_notified = "2021-11-05 15:00:00") {
/**
* @ findNotifDate : Finds the Date Difference of a Notification
* @ date_notified : The notification date
**/
}
function findNotifDate(date_notified = "2021-11-05 15:00:00") {
/**
* @ findNotifDate : Finds the Date Difference of a Notification
* @ date_notified : The notification date
**/
var date_sent_tmp = new Date(date_notified);
var date_sent = date_sent_tmp.getTime();
}
function findNotifDate(date_notified = "2021-11-05 15:00:00") {
/**
* @ findNotifDate : Finds the Date Difference of a Notification
* @ date_notified : The notification date
**/
var date_sent_tmp = new Date(date_notified);
//Check for timestamps
if(date_notified.indexOf('-') != -1){
var date_sent = date_sent_tmp.getTime();