M
mark4asp
Every time the function below is called I get the alert. So I put a
deliberate error in there and I check the value of
(reportType=='MANDATE') in Firebug, which is found to be true. But
still the alert comes up. Why?
I checked the following watch expressions at the blah blah point.
id = 5843
reportType = "MANDATE"
(reportType=='MANDATE') = true
It is being called like so:
showReport(5843,'MANDATE');
So what is going on here? Please let me in on the secret of writing a
switch statement.
function showReport(id, reportType, bHighlightRow)
{
var url;
switch (reportType) {
case 'INVESTOR':
url = 'getFundProfile.aspx?Ref='
break
case 'SUMMARY':
url = 'getprofile.aspx?Summary='
break
case 'MANDATE':
url = 'getprofile.aspx?Ref='
break
default:
alert('Error - javascript:showReport() called with wrong args')
}
blah blah;
}
deliberate error in there and I check the value of
(reportType=='MANDATE') in Firebug, which is found to be true. But
still the alert comes up. Why?
I checked the following watch expressions at the blah blah point.
id = 5843
reportType = "MANDATE"
(reportType=='MANDATE') = true
It is being called like so:
showReport(5843,'MANDATE');
So what is going on here? Please let me in on the secret of writing a
switch statement.
function showReport(id, reportType, bHighlightRow)
{
var url;
switch (reportType) {
case 'INVESTOR':
url = 'getFundProfile.aspx?Ref='
break
case 'SUMMARY':
url = 'getprofile.aspx?Summary='
break
case 'MANDATE':
url = 'getprofile.aspx?Ref='
break
default:
alert('Error - javascript:showReport() called with wrong args')
}
blah blah;
}