Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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!

share|improve this question
    
Use the Content Editor Webpart or the Script Link webpart to add the javascript snippet to the page. –  Robert Lindgren Feb 3 at 13:34
    
Also, make sure the page that you are editing is checked out first. –  Mike Feb 3 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 at 16:23
add comment

1 Answer 1

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...

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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