views:

30

answers:

1

I have a web page with dojo code on it, including a function passed to dojo.addOnLoad with the following code:

laborDetailHandler.RevenueTotalInput = dojo.byId('#{id:LaborRevenueTotal}');
if (!laborDetailHandler.RevenueTotalInput) {
 console.warn('RevenueTotalInput not found.')
}

If this code is in-line, even if it's above the LaborRevenueTotal inputbox, it works.

If this code is moved out to a script library, I get the 'RevenueTotalInput not found.' message, which tells me that dojo.addOnLoad receives the function and executes it, but for some reason the function isn't working.

I'm completely stumped here. Anyone have any ideas?

A: 

I apologize! I thought this was a dojo question; instead it was a Lotus Notes XPages question! I'm still not sure why this is happening, but someone has corroborated the that problem is larger than my script and how to resolve it.

My workaround is, rather than find these elements within the script library, to get handles to the elements I need and pass them to an initialize function within the script library.

Thank you very much peller for responding. I'm sorry my question was bad.

John Smart