473,383 Members | 1,803 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Add bullets to a Javascript file that generates a faculty listing

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
2 1854
Dormilich
8,658 Expert Mod 8TB
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
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

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

Similar topics

3
by: Antonio | last post by:
Good Morning, I would want to insert the javascript of google adsense in my site, here it is : <script type="text/javascript"><!-- google_ad_client = "pub-4902392511135327"; google_ad_width =...
21
by: ryanmhuc | last post by:
I know the subject might be confusing. I am no beginner with javascript but I haven't been able to figure out how to get the javascript file name from code inside the file. So you have an HTML...
7
by: moondaddy | last post by:
I want to dynamically create a JavaScript file and cache it on the client for re-use. I know how to write javascript to a web page from the code behind, but I don't know how to actually create a...
3
by: Angel | last post by:
Is there any way to debug a javascript file that I included in my ASP.net project. or some reason when I call a javascript function in the file from my ASP.NET code I get an error message. now if i...
24
by: gizoto316 | last post by:
I was wondering if it was possible to have php code in a javascript file. I have a java file with a bunch of functions on it and I wanted to add one where the action has php code in it. When i...
2
by: verci | last post by:
Hi guys, sorry if this seems stupid but I'm a newbie, I'm running Windows XP Pro SP2, IE 7, VS2005, ASP.net 2.0 The problem is that I'm trying to display this news scroller made in a Javascript...
17
by: NeoAlchemy | last post by:
I am starting to find more web pages that are using a query parameters after the JavaScript file. Example can be found at www.opensourcefood.com. Within the source you'll see: <script...
9
by: Mahernoz | last post by:
Hello Friends, The JavaScript File exmplmenu_var.js contains the code... (for the sake of brevity i am showing only that code which needs to be changed) I am actually developing a menu using...
1
by: runway27 | last post by:
i have a register.php and confirmregister.php file. in the first file the user fills a registeration form and in the second page they can review what they entered in the first page and then...
2
by: Matthew Wells | last post by:
Hello. I thought this was supposed to be simple. I'm trying to use a .js file for my javascript functions. I'm testing by only using one function The function works when it's at the top of...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.