iTom
11-22-2005, 05:25 PM
I'm working on this code for my website and ProBoards, but what have I done wrong??? Please help me. Thanks.
<script type="text/javascript">
// New PM alert and PM viewer.
//
// Designed by Thomas Oldbury,
// thomas@tgohome.com and
// Gryphon Lands.
// (http://gryphonlands.proboards79.com/)
//
// This header MUST stay intact
// for legal use.
// Customise the message, new denotes the amount of PMs so leave that there.
var message = "You have " +new+ " PM/'s. Click OK to view your PM/'s. ";
// your username
var username = "USERNAME";
// your proboards number (example: 77 is if your url is: username.proboards77.com) (http://username.proboards77.com)/)
var num = "77";
// custom title for PM popup if OK is clicked (if un-needed, leave blank)
var title = "";
// no need to change this...
var url = host + "index.cgi?action=pm";
var host = username + "proboards" + num + ".com";
var types = "width=800,height=600,toolbar,location,status,scrol lbars,menubar,resizable";
function runPmCheck()
{
var new = (td[2].innerHTML.match(/<\/a>, (.+?) new/i)) ? RegExp.$1: ''; /* grab the amount of PM's */
if(new > 0)
{
if(confirm(message))
{
if(!window.open(url,title,types))
{
alert("Unable to launch popup! /n/nThis may be because of a popup blocker. /n/nPlease use the link on the forum. ");
}
}
}
}
runPmCheck();
</script>
see on: http://scripts4u.proboards80.com/ (http://scripts4u.proboards80.com/)
thanks.
<script type="text/javascript">
// New PM alert and PM viewer.
//
// Designed by Thomas Oldbury,
// thomas@tgohome.com and
// Gryphon Lands.
// (http://gryphonlands.proboards79.com/)
//
// This header MUST stay intact
// for legal use.
// Customise the message, new denotes the amount of PMs so leave that there.
var message = "You have " +new+ " PM/'s. Click OK to view your PM/'s. ";
// your username
var username = "USERNAME";
// your proboards number (example: 77 is if your url is: username.proboards77.com) (http://username.proboards77.com)/)
var num = "77";
// custom title for PM popup if OK is clicked (if un-needed, leave blank)
var title = "";
// no need to change this...
var url = host + "index.cgi?action=pm";
var host = username + "proboards" + num + ".com";
var types = "width=800,height=600,toolbar,location,status,scrol lbars,menubar,resizable";
function runPmCheck()
{
var new = (td[2].innerHTML.match(/<\/a>, (.+?) new/i)) ? RegExp.$1: ''; /* grab the amount of PM's */
if(new > 0)
{
if(confirm(message))
{
if(!window.open(url,title,types))
{
alert("Unable to launch popup! /n/nThis may be because of a popup blocker. /n/nPlease use the link on the forum. ");
}
}
}
}
runPmCheck();
</script>
see on: http://scripts4u.proboards80.com/ (http://scripts4u.proboards80.com/)
thanks.