Author |
Topic |
|
wavp
Starting Member
United Kingdom
33 Posts |
Posted - 17 June 2001 : 07:00:35
|
Here is a simple mod which will display an alert when the user logs on, alerting the user that there are PM waiting to be read:
The JavaScript:
<SCRIPT LANGUAGE="JavaScript"> alert("You have messages!") </script>
The place where this bit of JavaScript goes is in the "privatemess.asp" at this point:
<td align="center" bgcolor="<% =strForumCellColor %>" valign="middle"> <% if strDBNTUserName = "" Then %> <IMG SRC="icon_pmdead.gif"> <% else if pmcount = 0 then %> <IMG SRC="icon_pm.gif"> <% end if if pmcount >= 1 then %> <IMG SRC="icon_pm_new.gif"> <SCRIPT LANGUAGE="JavaScript"> alert("You have messages!") </script> <% end if %> <% end if %> </td>
Thats it.
Will
Edited by - wavp on 17 June 2001 07:24:48 |
|
stuF
Average Member
United Kingdom
561 Posts |
Posted - 17 June 2001 : 09:29:07
|
would you be able to make it so it says "you have new private messages" then have options to read or igonre. If the read option is selected, the user is deirected to their inbox, if ignore is selected, the box disappears until more messages are recived.
that would be excellent. cheers. stuart@36-degrees.co.uk
|
|
|
wavp
Starting Member
United Kingdom
33 Posts |
Posted - 02 July 2001 : 11:42:20
|
Here is a more interactive alert box:
The VBScript:
<SCRIPT LANGUAGE="VBscript"> returnvalue=MsgBox ("Read the new private message?",36,"Private Message!") If returnvalue=6 Then window.location="pm_view.asp" Else End If </SCRIPT>
The place where this bit of VBScript goes is in the "privatemess.asp" at this point:
<td align="center" bgcolor="<% =strForumCellColor %>" valign="middle"> <% if strDBNTUserName = "" Then %> <IMG SRC="icon_pmdead.gif"> <% else if pmcount = 0 then %> <IMG SRC="icon_pm.gif"> <% end if if pmcount >= 1 then %> <IMG SRC="icon_pm_new.gif"> <SCRIPT LANGUAGE="VBscript"> returnvalue=MsgBox ("Read the new private message?",36,"Private Message!") If returnvalue=6 Then window.location="pm_view.asp" Else End If </SCRIPT> <% end if %> <% end if %> </td>
This will allow the person to choose either to read the new message or carry on loading the main forum page.
try it
Will
|
|
|
RDoGG™
Junior Member
USA
329 Posts |
Posted - 02 July 2001 : 16:32:00
|
quote:
Here is a more interactive alert box:
The VBScript:
<SCRIPT LANGUAGE="VBscript"> returnvalue=MsgBox ("Read the new private message?",36,"Private Message!") If returnvalue=6 Then window.location="pm_view.asp" Else End If </SCRIPT>
The place where this bit of VBScript goes is in the "privatemess.asp" at this point:
<td align="center" bgcolor="<% =strForumCellColor %>" valign="middle"> <% if strDBNTUserName = "" Then %> <IMG SRC="icon_pmdead.gif"> <% else if pmcount = 0 then %> <IMG SRC="icon_pm.gif"> <% end if if pmcount >= 1 then %> <IMG SRC="icon_pm_new.gif"> <SCRIPT LANGUAGE="VBscript"> returnvalue=MsgBox ("Read the new private message?",36,"Private Message!") If returnvalue=6 Then window.location="pm_view.asp" Else End If </SCRIPT> <% end if %> <% end if %> </td>
This will allow the person to choose either to read the new message or carry on loading the main forum page.
try it
Will
that's great!
i made an ASP file popup that shows details about the new PM.
|
|
|
gimpism
Starting Member
8 Posts |
Posted - 09 August 2001 : 20:52:12
|
would ther be a way for it not to mention the vbscript: in the popup? that may scare people
|
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 09 August 2001 : 22:41:01
|
that is a javascript warning and NO you cannot get rid of that without signed certificates which is a whole other story.
I don't use javascript alerts because they can be rather annoying. Instead I have a message appear under the forum banner that tells the visitor that they have a message, it really gets their attention, that and the audio indicator that they receive.
you can give it a whirl along with the other features I have at my site by logging in with
user: snitz pwd: snitz
Dayve |
|
|
|
Topic |
|