Author |
Topic  |
Alfred
Senior Member
   
USA
1527 Posts |
Posted - 14 December 2003 : 15:41:19
|
laser, what you are looking at is the old page, because I work on localhost with the new one. Like I said, the graphics are not right yet, only showing one medal per player in the blue table. |
Alfred The Battle Group CREDO
|
 |
|
Alfred
Senior Member
   
USA
1527 Posts |
Posted - 14 December 2003 : 15:44:12
|
quote: Originally posted by Nikkol
i agree with laser and making a table for the medals, where you could store the id, name, and the image file. but since it seems he does not have that currently, i replaced all the if statements with an array instead. a little easier to read and less code.
How do I make this? |
Alfred The Battle Group CREDO
|
 |
|
laser
Advanced Member
    
Australia
3859 Posts |
Posted - 14 December 2003 : 15:52:55
|
Alfred, I think we need to fix the problems that you have now. Can you upload the new page (maybe as default2.asp so you don't overwrite what you have now).
The extra stuff I suggested can come later, but you need a working page first  |
 |
|
Alfred
Senior Member
   
USA
1527 Posts |
Posted - 14 December 2003 : 15:56:29
|
Remembering about your advice some time ago, I uploaded the new code as decorated2.asp, but we can't do that page, because the db does not have the needed fields in it yet. I am waiting until tonight with disabling the site and changing the db. The current page is ok for now, but I need to fix the table display on localhost.
It looks logical enough here: quote: If currid <> numPlayerID then response.write "<br><div align=""center"">" response.write "<table bgcolor=""#37008A"" border=""5"" cellpadding=""5"" cellspacing=""0"" " & _ "style=""border-collapse: collapse"" bordercolorlight=""#FFFFCC"" " & _ "bordercolordark=""#666600"" bgcolor=""#000000"">" response.write "<tr><td width=""100%"" align=""center"">" response.write profileLink(strPlayerName, numPlayerID) response.write "<br><img border=""0"" src="""&"../images/"&replace(strCountry," ","") &".gif""><br>" End If
response.write DisplayMedalIcon(numPlayerID, intMedalID, strScenario, medalDate)
If currid <> numPlayerID then response.write "</td></tr></table></center></div>" End If
but for some reason puts additional medals for Avenger outside the table. |
Alfred The Battle Group CREDO
|
Edited by - Alfred on 14 December 2003 16:00:09 |
 |
|
Nikkol
Forum Moderator
    
USA
6907 Posts |
|
Nikkol
Forum Moderator
    
USA
6907 Posts |
|
Alfred
Senior Member
   
USA
1527 Posts |
|
Nikkol
Forum Moderator
    
USA
6907 Posts |
Posted - 14 December 2003 : 17:07:28
|
hmm, decorated2 looks nothing like the code I gave you... is it something else? anyway, you can try this for your do loop:
do while not myMedalMembers.eof
strPlayerName = myMedalMembers("M_NAME") '## to set up links in names ################
numPLayerID = myMedalMembers("MEMBER_ID") '###########################################
intMedalID = myMedalMembers("MEDAL_ID")
strCountry = myMedalMembers("M_COUNTRY")
strScenario = myMedalMembers("SCENARIO")
medalDate = myMedalMembers("MEDAL_DATE")
If currid <> numPlayerID then
response.write "<br><div align=""center"">"
response.write "<table bgcolor=""#37008A"" border=""5"" cellpadding=""5"" cellspacing=""0"" " & _
"style=""border-collapse: collapse"" bordercolorlight=""#FFFFCC"" " & _
"bordercolordark=""#666600"" bgcolor=""#000000"">"
response.write "<tr><td width=""100%"" align=""center"">"
response.write profileLink(strPlayerName, numPlayerID)
response.write "<br><img border=""0"" src="""&"../images/"&replace(strCountry," ","") &".gif""><br>"
End If
response.write DisplayMedalIcon(numPlayerID, intMedalID, strScenario, medalDate)
currid = numPlayerID
myMedalMembers.movenext
If not myMedalMembers.eof then
if currid <> myMedalMembers("MEMBER_ID") then response.write "</td></tr></table></center></div>"
else
response.write "</td></tr></table></center></div>"
End If
loop |
Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~ |
 |
|
Alfred
Senior Member
   
USA
1527 Posts |
Posted - 14 December 2003 : 17:22:04
|
Strange. ANyway, I reloaded it now with your new loop, which seems to do the trick! Thanks a million!   |
Alfred The Battle Group CREDO
|
 |
|
Topic  |
|