Baldwin238
Technical User
I use Snitz Forums on my site and I am having a problem with one of the"mods" I am adding in. No one over at their support forum like to answer my questions I post so I coming to my second home in hopes of finding an answer.
The problem is in somewhere. The code is inserted as an include into the footer of my forum so that it shows up on every forum page no matter what. The code is supposed to display a pop up "alert" message to the user for whatever amount I set it to in my admin section.
In the admin section, you can set it to alert 1-10 times. However, no matter what you set it for, it pops up endlessly every time you enter a new page or hit refresh (you could imagine how annoying that is). But I do need it so I can alert my members of an important announcement or change in schedule, etc.
I'm hoping someone can see a flaw in the code or in the logic of the code and possibly provide a fix or an idea for me! ANy help would be greatly appreciated. Thank you kindly - Jeff B.
ps. I have a feeling the error of constantly popping up is somewhere around or in these lines:
or here...
Jeff Baldwin
The problem is in somewhere. The code is inserted as an include into the footer of my forum so that it shows up on every forum page no matter what. The code is supposed to display a pop up "alert" message to the user for whatever amount I set it to in my admin section.
In the admin section, you can set it to alert 1-10 times. However, no matter what you set it for, it pops up endlessly every time you enter a new page or hit refresh (you could imagine how annoying that is). But I do need it so I can alert my members of an important announcement or change in schedule, etc.
I'm hoping someone can see a flaw in the code or in the logic of the code and possibly provide a fix or an idea for me! ANy help would be greatly appreciated. Thank you kindly - Jeff B.
ps. I have a feeling the error of constantly popping up is somewhere around or in these lines:
Code:
'We need to check now if the member has already or not be alerted
AlertShow = False
If not (rs2.EOF or rs2.BOF) then
rs2.movefirst
do until rs2.eof
AMDATAID = rs2("AM_DATA_ID")
AMID2 = rs2("AM_ID")
AMCOUNT2 = rs2("AM_COUNT") -1
AMNAME = rs2("AM_NAME")
or here...
Code:
If AMCOUNT2 < AMCOUNT then
'We edit and write back the entry by incrementing the count
UpdSql = ""
UpdSql = "UPDATE " & strMemberTablePrefix & "AM_DATA SET "
UpdSql = UpdSql & "AM_COUNT = " & AMCOUNT2 +1 & ""
UpdSql = UpdSql & " WHERE (((AM_ID)="& AMID & ") AND ((AM_NAME)='" & AMNAME & "'))"
set rs3 = my_conn.execute(UpdSql ,adOpenStatic,adCmdTxt)
AlertShow = True
End If
Jeff Baldwin