Skip to content

Instantly share code, notes, and snippets.

@nickmartini
Created September 1, 2009 19:10
Show Gist options
  • Save nickmartini/179312 to your computer and use it in GitHub Desktop.
Save nickmartini/179312 to your computer and use it in GitHub Desktop.
//old asp.net
function travelTo(loc)
{
var currentLoc = String(window.location);
var lastIndex = currentLoc.indexOf("Members/");
var finalLoc = currentLoc.substr(0, lastIndex);
if (loc == "Catalog")
window.location = finalLoc + "Members/Catalog/Default.aspx";
else if (loc == "ImplantInventory")
window.location = finalLoc + "Members/ImplantInventory/Default.aspx";
else if (loc == "OrderingLists")
window.location = finalLoc + "Members/OrderingLists/Default.aspx";
else if (loc == "ImplantUsage")
window.location = finalLoc + "Members/ImplantUsage/Default.aspx";
else if (loc == "CurrentOrder")
window.location = finalLoc + "Members/Ordering/CurrentOrder.aspx";
else if (loc == "Reports")
window.location = finalLoc + "Members/Reports/Default.aspx";
}
// NEW FUN SAP .NET
function __travelToBusy(pDest)
{
if (pDest != null && pDest != "#")
{
if (document.all)
{
for (var i=0;i < document.all.length; i++)
document.all(i).style.cursor = 'wait';
}
window.location = pDest;
}
else
{
alert("Sorry this page is not currently available");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment