Dear all,
I've stumble over the strange problem that JS function can't see function from
included .js file if it was called via RegisterStartupScript method
I have the page with "mysript.js" file included, which has a "prepareToWait()"
function implementation.
In the codebehind class I created the another function which I wanna register
as a startup script, and in this function I call my "prepareToWait()" from
included file.
So, I have smth like
string initscript = "function runOnLoad() { prepareToWait(); ..<calling other
functions>; _spBodyOnLoadFunctionNames.push('runOnLoad');"
Page.ClientScritpt.RegisterStartupScript(GetType(), "Startup", initscript,
true);
but after calling this I have an exception on prepareToWait(); that it can't be
found.
what could be the reason of that strange behaviour that sharepoint page can't
see my function?
Other functions from mysript.js , which are not called via
RegisterStartupScript, work fine on that page
---
Michael Nemtsev
------------------------------------------------------------------- OzMOSS.com
- to unsubscribe from this list, send a message back to the list with
'unsubscribe' as the subject.
Powered by mailenable.com - List managed by www.readify.net