I am trying to build a web application where users can review new projects each week. I have built an asp page with a table that is filled with summary information from a database about each project. I have included an onclick event in each cell that opens a detail popup window based on the innerHTML. For instance, there is a short description column. A more detailed description is viewed by clicking in the cell:

onclick="window.open('DescriptionDetail.asp?ShortDescription=' +innerHTML )

This works pretty well for most cells. However, there is one cell that could have a comma-delimited string of people in it. The cell is filled by this code:

<% strPeople = ""
SQLPeople = "Select * FROM T_People WHERE [OP_ProjNo] = " & vNo &";"
Set RSTPeople = Server.CreateObject("ADODB.Recordset")
RSTPeople.Open SQLPeople, DB_ConnectionString
	Do Until RSTPeople.EOF
	strPeople = strPeople + RSTPeople("OP_PartyName") & ", "
	RSTPeople.MoveNext
	Loop
	RSTPeople.Close
        Set RSTPeople = Nothing
	If right(strPeople, 2) = ", " then
	strPeople = Left(strPeople, (Len(strPeople) - 2))
	End If
	%>
	<%Response.Write strPeople%></td>

I am looking for a way that the user can click on one person in the string to open a detail window about just that one person.

I appreciate any guidance that I can get.

Thanks
Suf

Why are you passing a short description through the querystring as opposed to the project id?

Why are you storing the project number in the T_People table?

Are these people associated with each project in some way?

You need to clarify exactly what you are trying to achieve here.

Post back and I'll sort this for you no problem

Thanks for the reply. I posted this question a month and a half ago and have since figured it out.

To answer your questions though, this is an app that gives a brief summary of projects for people to join in on. Among the fields in a table full of projects there is a list of people already working on the project. The particular problem I was looking for help on was how to make each name in a comma separated string of names a link that opens a popup with contact info for that person.

I solved it by building the string with an href like this for each name:

<a href="PeopleDetail.asp?OP_ID=<%=RSTPeople("OP_ID")%>" onclick="return GB_showCenter('  People Detail', this.href)"><font color = "#4f6b72"><%=RSTParties("OP_PeopleName")%>

GBshowCenter is a jquery plugin function of the GreyBox modal popup, which by the way, works great!

Thanks,
Sup

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.