Timeline for Got blank page when add custom javascript to my CustomMasterPage
Current License: CC BY-SA 3.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 13, 2017 at 12:41 | history | edited | CommunityBot |
replaced http://sharepoint.stackexchange.com/ with https://sharepoint.stackexchange.com/
|
|
Sep 15, 2014 at 2:25 | vote | accept | user3622351 | ||
Sep 12, 2014 at 13:39 | comment | added | Mike |
You need to change the function2 with a function you want to load from your custom javascript. Look at the code again in my answer
|
|
Sep 12, 2014 at 13:39 | history | edited | Mike | CC BY-SA 3.0 |
added 9 characters in body
|
Sep 12, 2014 at 2:02 | comment | added | user3622351 | what do you mean "search for function2" ???? This from your code you gave me. :) . I don't know what function2 is? | |
Sep 11, 2014 at 13:10 | comment | added | Mike | you are referencing a function called function2 in your code that isn't defined, search for function2.. | |
Sep 11, 2014 at 6:09 | comment | added | user3622351 | THen I have one more error "Uncaught ReferenceError: myfunction2 is not defined " | |
Sep 11, 2014 at 6:08 | comment | added | user3622351 | in .master I've added : "<script type="text/javascript" src="../../Style Library/Js/custom.js"/>" . In my custom.js "SP.SOD.executeOrDelayUntilScriptLoaded(myfunction, 'sp.js'); function myfunction() { var x= "hello"; alert(x); SP.SOD.executeOrDelayUntilScriptLoaded(myfunction2, 'custom.js'); } SP.SOD.notifyScriptLoadedAndExecuteWaitingJobs("sp.js");" | |
Sep 11, 2014 at 4:41 | comment | added | Mike | did you have the function above in your code? | |
Sep 11, 2014 at 4:07 | comment | added | user3622351 | ahhh, I've fixed . there's no runat="server" in script tag. My site loaded, but went i'm press F12 . in Console I've seen 3 errors . Uncaught TypeError: Cannot read property 'onsubmit' of null ScriptResource.axd? Uncaught ReferenceError: theForm is not defined (index):784 Uncaught ReferenceError: theForm is not defined | |
Sep 11, 2014 at 3:46 | comment | added | user3622351 | After add <script type="text/javascript" src="~site/style library/js/custom.js" runat="server" /> I got Error "Sorry, somethings went wrong". Even I've try to changed ~sitecol ~sitecollection instead ~site . Because I'm working in sitecollection | |
Sep 11, 2014 at 3:33 | history | answered | Mike | CC BY-SA 3.0 |