Javascript does not work when served from a local machine

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an HTML page test page with a button that when pressed should display
an alert. When I load the page using the full pathname in the address bar
(eg. c.\myhtml\simple.html) the page gets rendered but on pressing the button
the alert does not appear.

When the page is loaded using a network path name (eg.
\\mymachine\myhtmlsimple.html) or served from a webserver everything works.

It used to work but as of yesterday it stopped working and I dont know why.
I have't (knowingly) changed anything. I'm using IE6 on XP Pro (SP1)

Any ideas as to the problem?
 
First thing to check - Tools...Internet Options...Advanced tab, Security
section - makes sure there's a check by "Allow active content to run in
files on My Computer".
 
First thing to check - Tools...Internet Options...Advanced tab, Security
section - makes sure there's a check by "Allow active content to run in
files on My Computer".

--

Jon R. Kennedy MS MVP/IE
Charlotte, NC USA
(e-mail address removed)
 
I solved it based on information from the artice 'Description of Internet
Explorer security zones registry entries'
(http://support.microsoft.com/kb/182569/en-us).

What I did was search for the key ‘Zones’ in the system registry, the child
key 0 represents the My Computer zone. Here I found that the entry 1400
(Scripting: Active scripting) was set to 3 (disabled). Changing it to 0 made
my pages work correctly.
 
No one has it on the Security tab. Look on the Advanced tab like he said.
Scroll down to the Security section.
 
Back
Top