This script isn’t working like it should and I’m not sure why. I’m new to Javascript programming so the obvious won’t be so obvious to me. When I run the script thru the IE debugger, the variable “mnuItm” does contain one ofthe values in the case clause but it’s not taking that path. It takes the “Default” path when it shouldn’t.
I also tried using the “id” as the switch object and that worked. I have no idea why one works and the other doesn’t. Please help!
Thanks,
Blake
function NoFunctionality(id)
{
var blnRedirect = true;
mnuItm = document.getElementById(id).innerText; */
switch ( mnuItm )
{
case 'liPhase1':
alert("Phase 1 functionality is not yet implemented!");
blnRedirect = false;
break;
case 'liPhase2':
alert("Phase 2 functionality is not yet implemented!");
blnRedirect = false;
break;
case 'liPhase3':
alert("Phase 3 functionality is not yet implemented!");
blnRedirect = false;
break;
case 'liPhase4':
alert("'Phase 4 functionality is not yet implemented!");
blnRedirect = false;
break;
default:
alert("Unknown Selection!");
break;
}
}