Files
alfresco-community-repo/source/web/scripts/ajax/common.js
Gavin Cornwell 98c5a2071c - Incorporated new sidebar which contains the shelf and navigator (tree) components
- Changed version number to 2.0.0 (dev)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4538 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-12-06 23:26:27 +00:00

40 lines
812 B
JavaScript

//
// Alfresco AJAX support library
// Gavin Cornwell 14-07-2006
//
/**
* Default handler for errors when using the dojo toolkit
*/
function handleErrorDojo(type, errObj)
{
// remove the dojo prefix from the message
var errorStart = "XMLHttpTransport Error: 500 ";
var msg = errObj.message;
if (msg.indexOf(errorStart) != -1)
{
msg = msg.substring(errorStart.length);
}
// TODO: Show a nicer error page, an alert will do for now!
alert(msg);
}
/**
* Default handler for errors when using the yahoo toolkit
*/
function handleErrorYahoo(msg)
{
// TODO: Show a nicer error page, an alert will do for now!
alert(msg);
}
/**
* Calculates and returns the context path for the current page
*/
function getContextPath()
{
var w = window.location;
alert(w.pathname);
}