Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JavaScript problem in IE7

Status
Not open for further replies.

Cineno

Programmer
Jul 24, 2006
142
US
Hello,

I recently made a page that uses JavaScript to create the menu. I was testing it ind Firefox and everything worked fine.

I then installed the newest version of Internet Explorer 7 to test it on that. When I try to open the page, I get that bar at the top that says something like "IE has restriced this webpage from running scripts or ActiveX controls..."

I know I can click the bar and say "allow scripts" or adjust the security settings to not restrict them. However, I don't want the viewers of my site having to do that. I want it just to load with no problem like it does in Firefox.

Does anyone know what I have to do? Is there something I have to change about the JavaScript that IE will not disable it?

Any help is greatly appreciated.
 
I'm assuming you're developing this page as a local file on your computer, correct? The page will act differently when it is uploaded to a web server and accessed from the 'net. By default, running scripts in local html files causes the prompt as of SP2. To disable this option do the following:

[ol][li]click on the "tools" button (it's not a menu anymore in IE7)[/li]
[li]select "internet options"[/li]
[li]click the "advanced" tab[/li]
[li]scroll down to the "security" section[/li]
[li]check the "allow active content to run in files on my computer" option[/li][/ol]

After selecting that option, javascript should run just fine in all html files that reside on your computer.

-kaht

[small](All puppies have now found loving homes, thanks for all who showed interest)[/small]
 
That fixed it!! Thanks a lot, this has been bothering me for a while, hahaha.

Yeah, I was running it off of a local file on my computer, so that solved it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top