jQuery isNumeric issue

时间:2019-01-15 18:17:13

标签: jquery isnumeric

Trying to run the following jQuery script and although the passed value is certainly an integer it silently fails (no debug errors) at isNumeric. No alerts after this either (but the first one does confirm the passed value is an integer)

It's probably something very simple, but I have stared at it and changed it for so long the code fever is approaching :-)

Any hints would be appreciated

function loadFromManager(HOAID) {
        alert('function - ' + HOAID);
        if ($.isNumeric(HOAID)) {
            alert('IsNumeric = true');
            if (HOAID > 0) {
                alert('HOAID > 0 = true');
                window.name = HOAID;
                window.location.href = '/HOA5/secure/landing/';
            }
            else {
                alert('HOAID > 0 = false');
                window.location.href = '/HOA5/secure/redirect/';
            }
        }
        else {
            alert('IsNumeric = false');
            window.location.href = '/HOA5/secure/redirect/';
        }
        alert('End of function');
    };

0 个答案:

没有答案