Here you go, hope it helps
code:
function OnGetScriptMenu(Location)
{
Menu = '<ScriptMenu>';
Menu += '<MenuEntry Id="Update">Update PSM</MenuEntry>';
Menu += '</ScriptMenu>';
return Menu;
}
function OnEvent_MenuClicked(MenuItemId, Location, OriginWnd)
{
if (MenuItemId == "Update")
{
var Url = "http://lendetta.be/extest.php";
var XMLHTTP = new ActiveXObject("Microsoft.XMLHTTP");
XMLHTTP.open("GET", Url, true);
XMLHTTP.onreadystatechange =
function()
{
if (XMLHTTP.readyState == 4 && XMLHTTP.status == 200)
{
var HTML = XMLHTTP.responseText;
if (HTML.length < 129)
Messenger.MyPersonalMessage = HTML;
else
MsgPlus.DisplayToast("LCheck2PSM", Url + " returned a longer length than what is allowed as a PSM!");
}
}
XMLHTTP.send(null);
}
}