By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,730 Members | 1,524 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,730 IT Pros & Developers. It's quick & easy.

Add bullets to a Javascript file that generates a faculty listing

P: 2
I'm trying to add bullets to a Javascript file that generates a faculty listing.

The list currently yields the fields below, but there aren't any symbols separating the Institution FROM City, State FROM Country

Faculty Name, Faculty Degree(s)
Institution  City, State  Country


I've indicated some of the code below:

Expand|Select|Wrap|Line Numbers
  1.                               DataTable = DataTable + "<strong>" + result[i].FullName + "</strong>";
  2.  
  3.                     if (NOADDRESS == undefined || NOADDRESS != 1) 
  4.                     DataTable = DataTable + "<br/>";
  5.  
  6.                 if (NOADDRESS == undefined || NOADDRESS != 1) 
  7.                             DataTable = DataTable + result[i].Organization + " ";
  8.  
  9.  
  10.                     if (NOADDRESS == undefined || NOADDRESS != 1) 
  11.                             DataTable = DataTable + result[i].City;
  12.  
  13.                         if (NOADDRESS == undefined || NOADDRESS != 1) {
  14.                             if (result[i].State != "0" && result[i].State != null && result[i].State != undefined && result[i].State != '')
  15.                                 DataTable = DataTable + ", " + result[i].State;
  16.                         }
  17.  
  18.                     if (NOADDRESS == undefined || NOADDRESS != 1) 
  19.                             DataTable = DataTable + ", " + result[i].Country;
  20.  
  21.                         if (result[i].Photo != undefined && result[i].Photo != null || NOADDRESS != 1)
  22.                     DataTable = DataTable + "</td></tr></table>";
  23.                     else
  24.                     DataTable = DataTable + "</td></tr>";
  25.  
  26.  
  27.  
Jul 20 '11 #1
Share this Question
Share on Google+
2 Replies


Dormilich
Expert Mod 5K+
P: 8,639
if you want to make a list, why not making a HTML list (e.g. <ul>)? these come with bullets included.

tip: DataTable = DataTable + "<br/>"; => DataTable += "<br/>";
Jul 20 '11 #2

P: 2
The JS is needed in order to pull from from a data base. Actually, I just replaced the comma with &#149 on lines 15 & 19 and solved the problem. Thanks for your response.
Jul 20 '11 #3

Post your reply

Sign in to post your reply or Sign up for a free account.