OnTheWater

Kayaks- Sit-In | Sit-On-Top | Dunham’s Sports


‘, atx:”}); catbanarr.push({cn:’view-all-departments/weider’, fbn:’weider’, subcat:’yes’, showmsg:’yes’, bmgtoch:’

‘, bmg:’

‘, atx:”}); catbanarr.push({cn:’view-all-departments/yeti’, fbn:’yeti’, subcat:’yes’, showmsg:’yes’, bmgtoch:’

‘, bmg:’

YETI

‘, atx:”}); if(searchpagegotthemsg==”no”){ for(s=0;s div.content-asset”).prepend(catbanarr[s].bmg);
$(“div.plp-verbiage > div.page-designer”).prepend(catbanarr[s].bmg);
searchpagegotthemsg=”yes”;
$(“div.breadcrumb-wrapper”).hide();
$(“div.page-header-title”).attr(“style”, “margin-top:0px !important;”);
$(“header.page-header”).attr(“style”, “padding-top:0px !important; padding-bottom:0px !important;”);
}
}else{
if(sfrabup2ch){
//console.log(catbanarr[s].bmgtoch);
//console.log(“Almost in”+sfrabup2ch.indexOf(catbanarr[s].bmgtoch));
if(sfrabup2ch.indexOf(catbanarr[s].bmgtoch)==-1){
//console.log(“IN”+sfrabup2ch.indexOf(catbanarr[s].bmgtoch));
//console.log(catbanarr[s].bmg);
//$(“div.plp-verbiage > div.content-asset”).prepend(catbanarr[s].bmg);
$(“div.plp-verbiage > div.page-designer”).prepend(catbanarr[s].bmg);
searchpagegotthemsg=”yes”;
$(“div.breadcrumb-wrapper”).hide();
$(“h2.page-header-title”).hide();
$(“header.page-header”).attr(“style”, “padding-top:0px !important; padding-bottom:0px !important;”);
}
}
}
}
}
}
}
var dpteambmg=’

TEAM DISCOUNT PROGRAM

‘;
var dpteambmg2ch=’dispro-team-banner-v2.jpg’;
var dpteamlist=’Cross|Country|Hockey|Gymnastics|Dodgeball|Roller|Derby|Swimming|Rugby|Cycling|Frisbee|Skiing|Skating|Pool|Darts|Weightlifting|Bowling|Lacrosse|Dance|Wrestling|Boxing|MMA|Track|Tennis|Running|Club|Volleyball|Cheerleading|Basketball|Soccer|Golf|Football|Softball|Baseball’;
var dpsportsbmg=’

SPORTSMENS DISCOUNT PROGRAM

‘;
var dpsportsbmg2ch=’dispro-sportsmens-banner-v3.jpg’;
var dpsportslist=’Hunting|Guns|Ammo|Hunting|Blinds|Gun|Safes|Treestands|Archery|Crossbow|Fishing|Boat|Kayak|Canoe’;
//CHECK FOR DISCOUNT PROGRAM KEYWORDS IN URL TO DISPLAY BANNER:
var dpmsgapp=”no”;
if(searchpagegotthemsg==”no”){
var kwarr=dpteamlist.split(“|”);
for(d=0;d div.content-asset”).prepend(dpteambmg);
$(“div.plp-verbiage > div.page-designer”).prepend(dpteambmg);
dpmsgapp=”yes”;
return true;
}
}
}else{
if(sfrabup2ch){
if(sfrabup2ch.indexOf(dpteambmg2ch)==-1){
if(dpmsgapp==”no”){
//$(“div.plp-verbiage > div.content-asset”).prepend(dpteambmg);
$(“div.plp-verbiage > div.page-designer”).prepend(dpteambmg);
dpmsgapp=”yes”;
return true;
}
}
}
}
}
}
if(dpmsgapp==”no”){
var kwarr=dpsportslist.split(“|”);
for(d=0;d div.content-asset”).prepend(dpsportsbmg);
$(“div.plp-verbiage > div.page-designer”).prepend(dpsportsbmg);
dpmsgapp=”yes”;
}
}
}else{
if(sfrabup2ch){
if(sfrabup2ch.indexOf(dpsportsbmg2ch)==-1){
if(dpmsgapp==”no”){
//$(“div.plp-verbiage > div.content-asset”).prepend(dpsportsbmg);
$(“div.plp-verbiage > div.page-designer”).prepend(dpsportsbmg);
dpmsgapp=”yes”;
}
}
}
}
}
}
}
}
/*
var ddsortdataid=$(“select[name=’sort-order’]”).find(‘:selected’).attr(‘data-id’);//sort-by-search-relevance
var sruleval=getParameterByName(“srule”, seaurl);
var seacepts=”|golf|shoes|cleat|cleats|treadmill|treadmills|glock|glocks|gun|guns|rifle|rifles|handgun|handguns|shotgun|shotguns|pistol|pistols|firearm|firearms|smith|golf|glove|gloves|revolver|revolvers|”;
var seatxtval=”|”+qsval+”|”;
if(seaurl.indexOf(“/search-show?”)!=-1&&seacepts.indexOf(seatxtval)==-1){
if(searchpagegotthemsg==”no”){
if(sruleval==”||sruleval==null&&ddsortdataid==’sortBySortPriority’){
var sbsr=$(“select[name
=’sort-order’] option[data-id=’sort-by-search-relevance’]”).val();
if(sbsr!=undefined){
window.location.replace(sbsr);
}
}
}
}else{
//not on a search result check if qstr srule is null and rel is selected then set sort to default
if(sruleval==”||sruleval==null&&ddsortdataid==’sort-by-search-relevance’){
var sbsr=$(“select[name=’sort-order’] option[data-id=’sortBySortPriority’]”).val();
if(sbsr!=undefined){
window.location.replace(sbsr);
}
}
}
*/
}
function storesNullLink(){
$(“a”).each(function(e){
if($(this).attr(“href”)==”null”){
$(this).attr(“href”, “#”);
}
});
}
function chValueVault(){
//check if the text ‘value vault’ exists within the html for div.breadcrumb-wrapper
if($(“div.breadcrumb-wrapper”).html()!=undefined){
var vvtxttoch=$(“div.breadcrumb-wrapper”).html().toLowerCase();
//append the text: (Coupons & Sales) to the div.page-header-title
if(vvtxttoch.indexOf(“value vault”)!=-1){
var headtxttoch=$(“.page-header-title”).html().toLowerCase();
var txttoapp=”(Coupons & Sales)”;
if(headtxttoch.indexOf(txttoapp.toLowerCase())==-1){
$(“.page-header-title”).append(txttoapp);
}
}
}
}
function chGloveSizePage(){
/
check url for .html: /
//https://www.dunhamssports.com/wilson-youth-11-a450-baseball-glove-W0000085778.html?cgid=00062
//check if the text ‘gloves’ && ‘mitts’ exists within the html for div.breadcrumb-wrapper
if(cururl.indexOf(“.html”)!=-1){
if($(“div.breadcrumb-wrapper”).html()!=undefined){
var vvtxttoch=$(“div.breadcrumb-wrapper”).html().toLowerCase();
//append the text: (Coupons & Sales) to the div.page-header-title
if(vvtxttoch.indexOf(“gloves”)!=-1&&vvtxttoch.indexOf(“mitts”)!=-1){
//insert the size chart
var sclout=’View Sizing Chart‘;
if($(“div.product-data > div.product-detail-attributes”).html().indexOf(sclout)==-1){
$(“div.product-data > div.product-detail-attributes”).append(sclout);
}
}
}
}
}
function chCatHideReviewDelay(){
setTimeout(chCatHideReview, 2000);
}
function chCatHideReview(){
//Hunting Shooting
//console.log(“chCatHideReview”);
var hidorno=”no”;
if(cururl.indexOf(“.html”)!=-1){
if($(“div.breadcrumb-wrapper”).html()!=undefined){
var vvtxttoch=$(“div.breadcrumb-wrapper”).html().toLowerCase();
if(vvtxttoch.indexOf(“hunting”)!=-1&&vvtxttoch.indexOf(“shooting”)!=-1){
hidorno=”yes”;
}else if(vvtxttoch.indexOf(“featured brands”)!=-1&&vvtxttoch.indexOf(“federal”)!=-1){
hidorno=”yes”;
}else if(vvtxttoch.indexOf(“featured brands”)!=-1&&vvtxttoch.indexOf(“remington”)!=-1){
hidorno=”yes”;
}else if(vvtxttoch.indexOf(“featured brands”)!=-1&&vvtxttoch.indexOf(“ruger”)!=-1){
hidorno=”yes”;
}else if(vvtxttoch.indexOf(“featured brands”)!=-1&&vvtxttoch.indexOf(“weider”)!=-1){
hidorno=”yes”;
}
if(hidorno==”yes”){
//hide the reviews
$(“div.bv-content-list-container”).attr(“style”, “display: none !important;”);
}
}
}
}
function addComingSoon(){
var cosomsg='(coming soon)’;
$(“div.hidden-sm-down > h1.store-attribute”).append(cosomsg);
}
function chStoreSchema(){
//check if on store page or locator page – look for StoreID
//storid4schema=getParameterByName(‘storeid’,cururl.toLowerCase());
if(cururl.indexOf(‘/store-locator’)!=-1){
//check if no querystring vars: /store-locator?showMap=true&horizontalView=true&isForm=true
if(cururl.indexOf(“showMap=true&horizontalView=true&isForm=true”)==-1){
window.location.replace(“https://www.dunhamssports.com/store-locator?showMap=true&horizontalView=true&isForm=true”);
}else{//on the locator page with correct map – show canonical
//console.log(“IN Canonical”);
//$cata=”;
$(”).appendTo(“body”);
}
}
if(cururl.indexOf(‘/Stores-Detail’)!=-1||cururl.indexOf(‘/store-details’)!=-1){//store-details
//storid4schema=getParameterByName(‘storeid’,cururl.toLowerCase());
if(storid4schema){
//build store schema and send to header:
buildStoreSchema(storid4schema);
addStoreFront(storid4schema);
}
}
//check if currently on a store that is coming soon
var curstidsoon=”|274|282|278|280|283|”;
if(curstidsoon.indexOf(storid4schema)!=-1){
console.log(“Suppress YES: “+storid4schema);
addComingSoon();
}else{
console.log(“Suppress NO: “+storid4schema);
}
//if(storid4schema==”280″||storid4schema==”283″||storid4schema==”274″){//274, 282, 278, 280, 283
/// addComingSoon();
//}
}
function getStoreIDforFront(wh){
var whtemp=””;
if(wh.substring(0,2)==”00″){
whtemp=wh.substring(2,3);
}else if(wh.substring(0,1)==”0″){
whtemp=wh.substring(1,3);
}else{
whtemp=wh;
}
wh=whtemp;
return wh;
}
function addStoreFront(wh){
//console.log(“ID 0-1: “+wh.substring(0,1));
//console.log(“ID 0-2: “+wh.substring(0,2));
//console.log(“ID 2-3: “+wh.substring(2,3));
var whtemp=””;
whtemp=getStoreIDforFront(wh);
wh=whtemp;
var storeimgtemp=’https://www.dunhamssports.com/on/demandware.static/-/Library-Sites-AutobahnSharedLibrary/default/dw5aa9d895/assets/img/store-fronts/1.jpg’;
var storesecondind=storeimgtemp.length-5;
var storeimgpath=storeimgtemp.substring(0,storesecondind);
var storeimgnamepath=storeimgpath+””+wh+”.jpg”;
var storeimg=”“;
//check if the description exists otherwise use store-circular
if($(“.store-description”).html()!=undefined){
$(“.store-description”).prepend(storeimg);
$(“.store-description”).append(“
“);
}else if($(“.store-circular”).html()!=undefined){
$(“.store-circular”).prepend(“
“);
$(“.store-circular”).prepend(storeimg);
}
}
function buildStoreSchema(wh){
var whid=””;
var phtemp=””;
var addr1temp=””;
var addr2temp=””;
var cittemp=””;
var stntemp=””;
var zctemp=””;
var suhtemp=””;
var mohtemp=””;
var tuhtemp=””;
var wehtemp=””;
var thhtemp=””;
var frhtemp=””;
var sahtemp=””;
var storeurl=”https://dunhamssportsforms.com/assets/php/returnstoredetails.php”;
var storeqstr=”whst=”+wh;
$.ajax({
type:’GET’,
url:storeurl,
dataType:’json’,
data:storeqstr,
success:function(r){
if(r.status===”success”){
console.log(“SUCCESS – “+r.message);
phtemp=r.s.ph;
addr1temp=r.s.addr1;
addr2temp=r.s.addr2;
cittemp=r.s.cit;
stntemp=r.s.stn;
zctemp=r.s.zc;
suhtemp=r.s.suh;
mohtemp=r.s.moh;
tuhtemp=r.s.tuh;
wehtemp=r.s.weh;
thhtemp=r.s.thh;
frhtemp=r.s.frh;
sahtemp=r.s.sah;
name2pass=”Sporting Goods in “+cittemp+”, “+stntemp;
$(“#storefrontimg”).attr(“alt”, name2pass).attr(“title”, name2pass);
var addr2pass=””+addr1temp;
var mohtemparr=mohtemp.split(“|”);
var mohopen2pass=”2015-07-27T”+mohtemparr[0];
var mohclos2pass=”2015-07-27T”+mohtemparr[1];
var sahtemparr=sahtemp.split(“|”);
var sahopen2pass=”2015-07-27T”+sahtemparr[0];
var sahclos2pass=”2015-07-27T”+sahtemparr[1];
var suhtemparr=suhtemp.split(“|”);
var suhopen2pass=”2015-07-27T”+suhtemparr[0];
var suhclos2pass=”2015-07-27T”+suhtemparr[1];
if(addr2temp!=””){
addr2pass+=” “+addr2temp;
}
var storschemadata={
“@context” : “http://schema.org”,
“@type” : “LocalBusiness”,
“name” : name2pass,
“image” : “https://www.dunhamssports.com/on/demandware.static/-/Library-Sites-AutobahnSharedLibrary/default/dw283f620d/images/logo.svg”,
“telephone” : phtemp,
“address” : {
“@type” : “PostalAddress”,
“streetAddress” : addr2pass,
“addressLocality” : cittemp,
“addressRegion” : stntemp,
“postalCode” : zctemp
},
“openingHoursSpecification” : [ {
“@type” : “OpeningHoursSpecification”,
“dayOfWeek” : {
“@type” : “DayOfWeek”,
“name” : “Mon-Fri”
},
“opens” : mohopen2pass,
“closes” : mohclos2pass
}, {
“@type” : “OpeningHoursSpecification”,
“dayOfWeek” : {
“@type” : “DayOfWeek”,
“name” : “Sat”
},
“opens” : sahopen2pass,
“closes” : sahclos2pass
}, {
“@type” : “OpeningHoursSpecification”,
“dayOfWeek” : {
“@type” : “DayOfWeek”,
“name” : “Sun”
},
“opens” : suhopen2pass,
“closes” : suhclos2pass
} ]
};
//creating the script element and storing the JSON-LD
var storscript = document.createElement(‘script’);
storscript.type = “application/ld+json”;
storscript.innerHTML = JSON.stringify(storschemadata);
document.getElementsByTagName(‘head’)[0].appendChild(storscript);
}else if(r.status===”error”){
console.log(“ERROR – “+r.message);
//updStoreDD(‘old’);
}
}
});
}
function getParameterByName(name, url){
if(!url){
url=window.location.href;
}
name=name.replace(/[[]]/g, ‘\$&’);
var regex=new RegExp(‘[?&]’+name+'(=([^]
)|&|#|$)’),results=regex.exec(url);
if(!results){
return null;
}
if(!results[2]){
return ”;
}
return decodeURIComponent(results[2].replace(/+/g, ‘ ‘));
}
/* FUNCTIONS – END */

Scan the QR code with your phone’s camera to opt-in for text reminders (enrolling from your phone, simply tap the QR code to opt-in). Phone used must match the phone number you typed into this form submission so we know what team to link the reminder to. Opt-in is not complete until you send the above keyword and reply back with Y to confirm.

“; if(pcomo==”mo”){ trinote+=”“;
}
trinote+=”“;
if(pcomo==”mo”){
trinote+=”
“; } trinote+=””; $(“#textreminderdiv > div”).append(trinote); $(“#textreminder”).css(“width”, “70px”); $(“#textreminder”).on(‘change’, function(e){ var tr=$(this).val(); //show or hide the QR Code and text alert message if(tr==”Yes”){ $(“#scanqrdiv”).css(“display”, “inline-block”); //alert(“text COACH to 78557 to opt-in for weekend reminders from the same number you typed into this form. Then reply with a Y to confirm”); }else{ $(“#scanqrdiv”).css(“display”, “none”); } }); } }); /* FUNCTIONS / function wrJQUIToHead(){ var jquijs=’https://www.dunhamssports.com/on/demandware.static/-/Library-Sites-AutobahnSharedLibrary/en_US/v1667312436105/assets/js/jquery-ui.min.js’; var jquicss=’https://www.dunhamssports.com/on/demandware.static/-/Library-Sites-AutobahnSharedLibrary/en_US/v1667312436105/assets/css/jquery-ui.min.css’; var jquistyle=document.createElement(‘link’); jquistyle.type=”text/css”; jquistyle.href=jquicss; jquistyle.rel=”stylesheet”; document.getElementsByTagName(‘head’)[0].appendChild(jquistyle); var jquiscript=document.createElement(‘script’); jquiscript.type=”text/javascript”; jquiscript.src=jquijs; document.getElementsByTagName(‘head’)[0].appendChild(jquiscript); } function biClicked(whic){ //whic=0 switch (whic){ case 0: handleDropDownCh(“non”); break; case 1: handleDropDownCh(“team”); break; case 2: handleDropDownCh(“sportsmen”); break; case 3: handleDropDownCh(“company”); break; case 4: handleDropDownCh(“group-organization”); break; case 5: handleDropDownCh(“military”); break; default: handleDropDownCh(“non”); break; } } function initSourceVal(){ //determine if the sc val exists in the url, if true then add a hidden val to the form to pass this through – add the sourcecode to a cookie val in case the visitor navigates away from this page before coming back and submitting ##cookie //check for sc in url and in cookie, if exists pass val through to form either in action as querystring or append an input to the form: // new source campaign flow: var disprosctoch=getCookie(“disprosc”); //var thisisnow=new Date(); //var ttdiff=0; var cururltoch = “” + window.location.href; var sourcecampaign = gPBN(‘sc’, cururltoch.toLowerCase()); //1. check if URL has sc value if so then set the var and cookie if(sourcecampaign){//set var and cookie setCookie(“disprosc”, sourcecampaign, 365); }else{//check if cookie or set all to none if(disprosctoch){ sourcecampaign=disprosctoch; }else{ sourcecampaign=”none”; } } return sourcecampaign; } function updTermsLink(){ var returnsc=initSourceVal(); var scinput=”; $(“div.update-section”).each(function (){ $(this).prepend(scinput); }); $(“.tab”).each(function(){ var olpotxt=” (No P.O. Boxes if requesting over 1,000 cards)”; var thpo=$(this).html(); var thpotemp=thpo.replace(olpotxt, “”); $(this).html(thpotemp); }); } function chDeliveryMethod(){ //$(“#Company div.checkbox-group > label:eq(2)”).css(“display”, “none”); rwLabels(“Company”); //$(“#Sportsmens-Club”) rwLabels(“Sportsmens-Club”); //$(“#Group-Organization”) rwLabels(“Group-Organization”); //hide the 3rd label and rewrite the first two } function rwLabels(wh){ //update the drop-down with a Military option: //$(“#program-select”) //label 1 replace: var l1a=”Print & Mail (please specify how many below)“; var l1b=”Printed Cards
We understand there may be special circumstances that require printed cards. By checking this box, you consent to Dunham’s contacting you for further information.”; var l1temp=$(“#”+wh+” div.checkbox-group > label:eq(0)”).html(); var l1=l1temp.replace(l1a, l1b); $(“#”+wh+” div.checkbox-group > label:eq(0)”).html(l1); //label 2 replace: var l2a=”Post a PDF to Internal Site or Member Informational Area“; var l2b=”Digital Download
You will receive an email that includes a PDF that you can post in an informational area or on an internal website. This communication will include instructions on how to download your discount directly to your Mobile Wallet app.”;
var l2temp=$(“#”+wh+” div.checkbox-group > label:eq(1)”).html();
var l2=l2temp.replace(l2a, l2b);
$(“#”+wh+” div.checkbox-group > label:eq(1)”).html(l2);
$(“#”+wh+” div.checkbox-group > label:eq(2)”).css(“display”, “none”);
}
function chSetTeamRadio(){
$(“input[name=’distributionOffer’]”).each(function (){
if ($(this).val() == “Email my weekend flyer but Print and Mail my discount cards”){
$(this).val(“Email my offers weekend flyer but Print and Mail my discount cards”);
}
});
}
function updateHidFormVal(){
document.forms[2].elements.namedItem(“ProgramType”).value = “Company”;
document.forms[3].elements.namedItem(“ProgramType”).value = “Sportsmens-Club”;
document.forms[4].elements.namedItem(“ProgramType”).value = “Group-Organization”;
document.forms[5].elements.namedItem(“ProgramType”).value = “Team”;
if (document.forms[2].action == “http://cloud.dunhamssports-email.com/message-discount-programs”){
document.forms[2].action = “https://cloud.dunhamssports-email.com/message-discount-programs”;
}
if (document.forms[3].action == “http://cloud.dunhamssports-email.com/message-discount-programs”){
document.forms[3].action = “https://cloud.dunhamssports-email.com/message-discount-programs”;
}
if (document.forms[4].action == “http://cloud.dunhamssports-email.com/message-discount-programs”){
document.forms[4].action = “https://cloud.dunhamssports-email.com/message-discount-programs”;
}
if (document.forms[5].action == “http://cloud.dunhamssports-email.com/message-discount-programs”){
document.forms[5].action = “https://cloud.dunhamssports-email.com/message-discount-programs”;
}
}
function handleDropDownCh(whpsearch){ //whpsearch=””
if (whpsearch == “company”){
$(“#program-select”).val(“Company”).change();
} else if (whpsearch == “sportsmen”){
$(“#program-select”).val(“Sportsmens-Club”).change();
} else if (whpsearch == “group-organization”){
$(“#program-select”).val(“Group-Organization”).change();
} else if (whpsearch == “team”){
$(“#program-select”).val(“Team”).change();
} else if (whpsearch == “military”){
$(“#program-select”).val(“Military”).change();
} else {
$(“#program-select”).val(“non”).change();
}
updateHidFormVal();
}
function updateHeaderTxt(wh){
$(“#discountsbody > h1″).html(wh);
}
function setUrlParam(whpParam){
const url = new URL(window.location);
url.searchParams.set(‘whp’, whpParam);
window.history.pushState({}, ”, url);
}
function chDiscountQSTR(){
if(cururl.indexOf(‘/Discounts-Show’)!=-1||cururl.indexOf(‘/discounts-show’)!=-1){
updateDisProDD();
dicururl = “” + window.location.href;
whpsearch = gPBN(‘whp’, dicururl.toLowerCase());
handleDropDownCh(whpsearch);
//alert(whpsearch);
//console.log(“IN: hpcaroscont”);
if(whpsearch!=”non”&&whpsearch!=””){
//console.log(“HIDE: hpcaroscont”);
$(“.hpcaroscont”).css(“display”, “none”);
}
}
}
function updateDisProDD(){
var opttoadd=”Military”;
$(“#program-select”).append(opttoadd);
}
function gPBN(name, url){
if (!url) url = window.location.href;
name = name.replace(/[[]]/g, ‘\$&’);
var regex = new RegExp(‘[?&]’ + name + ‘(=([^]
)|&|#|$)’),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return ”;
return decodeURIComponent(results[2].replace(/+/g, ‘ ‘));
}
function updStoreDD(wh){
//if(wh==’new’){
var newddout=bGenStoreSel();
//}else{
// var newddout=bGenStoreSel_OLD();
//}
document.forms[5].elements.namedItem(“StoreLocation”).innerHTML=newddout;
}
function dynamicSort(property){
var sortOrder=1;
if(property[0]===”-“){
sortOrder=-1;
property=property.substr(1);
}
return function(a,b){
if(sortOrder == -1){
return b[property].localeCompare(a[property]);
}else{
return a[property].localeCompare(b[property]);
}
}
}
function bGenStoreSel(){
//dynlivsto[“cit”].sort();
//dynlivsto.sort((a, b) => a.cit.localeCompare(b.cit));
dynlivsto.sort(dynamicSort(“cit”));
var ssout=’Select Store’+”n”; var tempopt1=””; var tempopt2=””; var addaddr=false; for(i=0;i=0&&!addaddr){
if(dynlivsto[i].cit==dynlivsto[i-1].cit&&dynlivsto[i].stn==dynlivsto[i-1].stn){
addaddr=true;
}
}
//if((dynlivsto[i].cit==dynlivsto[i+1].cit&&dynlivsto[i].stn==dynlivsto[i+1].stn)||(dynlivsto[i].cit==dynlivsto[i-1].cit&&dynlivsto[i].stn==dynlivsto[i-1].stn)){
if(addaddr){
if(dynlivsto[i].id==”249″){
tempopt2=tempopt1+” (“+dynlivsto[i].addr1+”)”;
}else{
if(dynlivsto[i].addr2){
tempopt2=tempopt1+” (“+dynlivsto[i].addr2+”)”;
}else{
tempopt2=tempopt1+” (“+dynlivsto[i].addr1+”)”;
}
}
}else{
tempopt2=tempopt1;
}
ssout+=””+tempopt2+”n”;
}
return ssout;
}
function getAllStoresLive(){//Function to populate stores object array with json received from live api connection at:
//set api url and qstr vars to get all current store data:
//https://dunhamssportsforms.com/assets/php/returnstoredetails.php?whst=all or XXX/storeID
//https://dunhamssportsforms.com/assets/php/returnstoredetails.php?whst=007
var storeurl=”https://dunhamssportsforms.com/assets/php/returnstoredetails.php”;
var storeqstr=”whst=all”;
$.ajax({
type:’GET’,
url:storeurl,
dataType:’json’,
data:storeqstr,
success:function(r){
if(r.status===”success”){
console.log(“SUCCESS – “+r.message);
//loop through the storesobj array and populate the dynlivsto object array with vars
var stct=r.s.length;
for(i=0;ihttps://dunhamssportsforms.com/assets/content/reviewbvbadgesfra.js

Read more from this Story