Reply
Help with passing no arguments
Old 04-24-2007, 08:42 PM Help with passing no arguments
Super Talker

Posts: 109
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
DonnaZ is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 04-24-2007, 09:02 PM Re: Help with passing no arguments
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,945
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Code:
if ([second argument here] == undefined) {
 
}
That may do what you want.
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 04-26-2007, 04:41 PM Re: Help with passing no arguments
Super Talker

Posts: 109
Adam,

Thanks

DZ
DonnaZ is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Help with passing no arguments
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Webmaster Resources Marketplace:
Software Development Company | Webhosting.UK.com | Text Link Brokers 


   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11450 seconds with 12 queries