|
Hi all,
I really need some help right now. I wrote a function for my new job that I placed into 15 pages.
Here is the function...
function swapFLSText(lcText) {
if (fls_user) // condition to change the text
{
var newbody = document.getElementById(lcText)
var newtext = "the Financial Life Team";
newbody.innerHTML=newtext;
}
}
Well, guess what. I'm passing a lower case "t" in "the" and I came across a change that it's the BEGINNING of a sentence.
I could just rewrite a swapFLSText2() to pass the innerHTML with the "The Financial Life Team"....
But I'm wondering with all the great minds in CyberSpace... if I passed a second argument in the newer version, how could I check for the undefined in JavaScript that would still let the swapFLSText(lcText) work without having to go back into 15 pages to change it for a second parameter.
Does this make sense?
DonnaZ
|