I have SharePoint Online hosted by Microsoft, individual edition. I noticed that when adding links with a hash (#) to a page, these links would not be saved. I thought it was a bug and decided to include some Javascript, either in a "a href" or in an input button. Surprise! The save command deletes ALL my javascript code (in the body, I can keep it in a different web part)

Am I doing something wrong or is Microsoft artificially limiting me because I bought the least expensive hosting option? I feel shortchanged! I cannot do very basic things!

  • Use the Content Editor Webpart or the Script Link webpart to add the javascript snippet to the page. – Robert Lindgren Feb 3 '14 at 13:34
  • Also, make sure the page that you are editing is checked out first. – Mike Feb 3 '14 at 14:55
  • Thanks for the answers, but I am using Script Editor and all other changes are saved. It's only the Javascript and the URL links (when they contain a hash) which get edited. – Guichito Feb 3 '14 at 16:23

I finally figured out the problem. I was reusing a page that I did not create, it was created by the Sys Admin. Once I started using pages I did create everything worked fine and SP stopped stripping my code. Still, it would be nice to have a warning message or something...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.