I'd say Bill and I came in a draw on that one :P I only know because I've slapped my forehead on it before.
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matthew Cosier Sent: Friday, 7 December 2007 1:47 PM To: listserver@ozMOSS.com Subject: [OzMOSS] RE: RegisterStartupScript doesn't see the function from external JS file Mitch, you're a legend! Regards, Matthew Cosier Readify | Senior Developer M: 0401 932 250 | E: [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]> | W: www.readify.net<http://www.readify.net/> | B: http://<http://cosier.wordpress.com/>cosier.wordpress.com ________________________________ From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Michael Nemtsev [EMAIL PROTECTED] Sent: Friday, 7 December 2007 1:41 PM To: listserver@ozMOSS.com Subject: [OzMOSS] RE: RegisterStartupScript doesn't see the function from external JS file Like <script src="..." /> but does it make sense for RegisterStartupScript being blind for this inclusion? Michael Nemtsev ________________________________ From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Mitch Denny [EMAIL PROTECTED] Sent: Friday, 7 December 2007 12:04 PM To: listserver@ozMOSS.com Subject: [OzMOSS] RE: RegisterStartupScript doesn't see the function from external JS file Hi Michael, how have you defined the of the script? <script src="..." /> -or- <script src="..."></script> -or- <script src="..."> (no end tag) From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Nemtsev Sent: Friday, 7 December 2007 11:52 AM To: listserver@ozMOSS.com Subject: [OzMOSS] RE: RegisterStartupScript doesn't see the function from external JS file my startup script is inserting AFTER the inclusion of myscript.js, because it inserted into head in Sharepoint master page explicitly that seems to be the problem. need to think about neat way how to cope with this situation Michael Nemtsev ________________________________ From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Matthew Cosier [EMAIL PROTECTED] Sent: Friday, 7 December 2007 11:47 AM To: listserver@ozMOSS.com Cc: Neville Mehta Subject: [OzMOSS] RE: RegisterStartupScript doesn't see the function from external JS file You'll probably find that it's actually inserted the startup script prior to the inclusion of the myscript.js, or something like that (some type of ordering issue). For all javascript related issues/debugging, I recommend the usage of FireFox and the FireBug plugin. You can then inspect the generated output much clearer, and determine if the ordering of your script is correct. Regards, Matthew Cosier Readify | Senior Developer M: 0401 932 250 | E: [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]> | W: www.readify.net<http://www.readify.net/> | B: http://<http://cosier.wordpress.com/>cosier.wordpress.com ________________________________ From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Michael Nemtsev [EMAIL PROTECTED] Sent: Wednesday, 5 December 2007 10:00 AM To: listserver@ozmoss.com Cc: Neville Mehta Subject: [OzMOSS] RegisterStartupScript doesn't see the function from external JS file 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 ------------------------------------------------------------------- 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 ------------------------------------------------------------------- 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 ------------------------------------------------------------------- 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 ------------------------------------------------------------------- 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 ------------------------------------------------------------------- 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 ------------------------------------------------------------------- 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