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?

  • 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. – Vainktesh Kumar Oct 26 '17 at 12:04
  • If you reload the page after seeing this, does it load properly? – Derek Gusoff Oct 26 '17 at 13:43
  • Yes refreshing it works fine because those scripts tags are removed. – Frank Martin Oct 27 '17 at 6:07
-1

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

This will solve your issue

  • Doesn't work. Script Editor treats it as text. – Frank Martin Oct 26 '17 at 11:58
  • This is wrong. You need the script tags. – Derek Gusoff Oct 26 '17 at 13:42

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.