gecko-dev/mailnews/compose/resources/content/MsgAttachPage.js
1999-07-31 19:05:36 +00:00

33 lines
786 B
JavaScript

var addattachmentfunction = null;
function Startup()
{
/* dump("Startup()\n"); */
if (window.arguments && window.arguments[0] && window.arguments[0].addattachmentfunction)
{
addattachmentfunction = window.arguments[0].addattachmentfunction;
doSetOKCancel(AttachPageOKCallback, AttachPageCancelCallback);
}
else
{
dump("error, no callback registered for OK\n");
}
}
function AttachPageOKCallback()
{
/* dump("attach this: " + document.getElementById('attachurl').value + "\n"); */
if (addattachmentfunction) {
addattachmentfunction(document.getElementById('attachurl').value);
}
return true;
}
function AttachPageCancelCallback()
{
return true;
}