Not sure the subject explains this but I have a div I populate with results returned from an ajax call.
$('#clubsearch_list div[data-role="content"]').append(data.clublist.accountname +'<br> '+ data.clublist.accountaddy+'<BR> '+data.clublist.accountcity+' '+ data.clublist.accountzip +'<BR> '+ data.clublist.accountcontact +'<BR> <a href= "mailto:'+ data.clublist.accountemail +'" >Email</a><BR> <a href="'+ data.clublist.accounturl +'">Website</a><BR> <a href=tel:'+ data.clublist.accountphone +'>'+ data.clublist.accountphone +'</a><br> '+data.clublist.coupons+'</p><br>');
What I need to do is omit sections if there is no data. If there is no email address, I don't want it to be sent for display. I know there needs to be a if LEN(data.clublist.accountemail) = 0 {.....
Chris Scott
$('#clubsearch_list div[data-role="content"]').append(data.clublist.accountname +'<br> '+ data.clublist.accountaddy+'<BR> '+data.clublist.accountcity+' '+ data.clublist.accountzip +'<BR> '+ data.clublist.accountcontact +'<BR> <a href= "mailto:'+ data.clublist.accountemail +'" >Email</a><BR> <a href="'+ data.clublist.accounturl +'">Website</a><BR> <a href=tel:'+ data.clublist.accountphone +'>'+ data.clublist.accountphone +'</a><br> '+data.clublist.coupons+'</p><br>');
What I need to do is omit sections if there is no data. If there is no email address, I don't want it to be sent for display. I know there needs to be a if LEN(data.clublist.accountemail) = 0 {.....
Chris Scott