Prevent error message with optional JavaScript Parameter?
Posted: Tue Mar 25, 2008 7:55 am
I'd like to have an optional third parameter though I don't want the error console complaining when it does not exist, how do I handle an undefined parameter in such a situation? I have trued to return, return true, return false, and null though since none of them worked I presume the extent of my know-how has run out. 
My JavaScript looks like this...
My JavaScript looks like this...
Code: Select all
function ajax2(name3up,name2up,name1up){if (name1up == undefined) {null;}}