Program not working on pc | SoloLearn: Learn to code for FREE!

+1

Program not working on pc

I have written a code in this app and it is working fine. But, when I put that same same code in my pc it is showing that you are viewing a local or shared file. Please solve my issue if anyone knows!!

10/20/2020 11:14:57 AM

Sahil Chib

16 Answers

New Answer

+4

Sahil Chib I assume that you are talking about this code.. https://code.sololearn.com/Wfu7dxmfxy8l/?ref=app And this works fine in pc too..in sl browser.

+3

After copying and pasting the html code into my text editor then saving the file as an html file on my hard drive it works perfectly. (Windows 10 64-bit). The message you are receiving "you are viewing a local or shared file" is not one that I am familiar with under Windows 10. In older versions of Windows such as XP there were security restrictions imposed on local html files which prevented javascript from running. This was to reduce the risk of malware. If you are running such an old system and using Internet Explorer then this can be circumvented by using the "Mark of the Web" (MOTW). Add the following comment after the doctype declaration.. <!-- saved from url=(0016)http://localhost --> If you are not using IE this will not work and the problem is either an issue with the security settings in your browser or operating system. Edit. You can check that the page is loading, but JavaScript is not running, by placing some text before the script tag e.g. <h1>Hello World</h1>. If the text displays but the answer does not then your page is loading but your code is not being executed.

+2

Did you put DOCTYPE in browser version of your HTML code?

+1

Martin Taylor hi can I message you personally

+1

Sahil Chib I found this recently while trying to load a shared file in a VM... https://docs.microsoft.com/en-us/openspecs/ie_standards/ms-iedoco/e3f53c89-d2d1-4db3-828f-fcbfe861b609 Apparently compatibility mode is set on Intranet sites, and will downgrade the user agent to IE7 on Win10. This will break all kinds of HTML, CSS, and JS on your pages. You either have to manually unselect the option in browser settings or make sure you use appropriate !DOCTYPE exceptions (https://docs.microsoft.com/en-us/openspecs/ie_standards/ms-iedoco/380e2488-f5eb-4457-a07a-0cb1b6e4b4b5 ) to make the browser use IE11 (or Edge) compatible settings. The meta tags in the code overrides the compatibility mode settings in the browser settings. So, as others have mentioned... Check your browser settings.

+1

Sahil Chib answer a few questions: what operating system are you using? what browser / version are you using? are you using a security package that can modify your security settings (Norton, McAfee, Comodo, etc). If you don't know how to determine your operating system or browser use this page. https://www.whatismybrowser.com Scroll down the page and it will also tell you if JavaScript is enabled.

0

what program did you use to run the copied code from sololearn

0

If it's HTML save your file with .html extension and open it in a web browser.

0

Coding Kitty html

0

chris I did

0

chris but not working only blank white pafe

0

Sahil Chib it is not possible to message me personally as I access SoloLearn through a web browser.

0

Kode Krasher I tried everything but not working

0

Kode Krasher chrome latest

0

Sahil Chib OS? Security Package? Is Javascript showing enabled on that website?