4

This issue is happening from client PCs only. If I open the browser on server machine using RDP then it works. Here's what's happening.

  1. Edit page
  2. Add Content Editor or Script Editor
  3. Write code <script></script> or <script language="javascript">alert("hello world");</script>
  4. Press "Save" button on ribbon to save page
  5. "The page cannot be displayed" error is shown in browser. Tested in IE, Chrome and Firefox.

But when I do same operation on IE on SharePoint server itself then it works fine.

Is it due to some security/firewall/AD/browser policy?

3
  • Hi Frank, it is always advisable to create a .txt file or .html in any library and then reference the link to your content editor webpart. try writing <script>##your code##</script> and see if it works. Oct 26, 2017 at 12:04
  • If you reload the page after seeing this, does it load properly? Oct 26, 2017 at 13:43
  • Yes refreshing it works fine because those scripts tags are removed. Oct 27, 2017 at 6:07

1 Answer 1

-1

Use your javascript code directly in Script Editor without <script></script>

This will solve your issue

2
  • Doesn't work. Script Editor treats it as text. Oct 26, 2017 at 11:58
  • This is wrong. You need the script tags. Oct 26, 2017 at 13:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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