/    Sign up×
Community /Pin to ProfileBookmark

Running Javascript, basic ? from newbie

When running javascript on webpage in WinXP2 how can I stop, or overcome, the security information bar occuring if the browser has not ticked “Allow active content in files on My Computer” in the Internet Options setup?

Appologies if this has been covered but have searched the forums and unable to find the answer.

It may be simple but its causing me problems.
Any help gratefully received

to post a comment
JavaScript

6 Comments(s)

Copy linkTweet thisAlerts:
@ricpDec 24.2006 — It's to do with the location the file is running from. There may be a way of turning off this from either the registry (or from within the Internet Options itself) but the simplest method I find is to run any test pages you have from within your own wwwroot directory.

You say you are a newbie so I'll explain what I mean by that, let me know if it's either too difficult to get (or in the reverse if I'm patronising you - and if I am apologies in advance).

In Windows you will have the ability to run IIS (amongst other web hosting applications) or Internet Information Services to give it it's full name. It isn't installed as default and you need to install it from the [add/remove applications] option in the control panel (once there check the Windows Components section, you should see IIS as an item in that list).

If you want to find out if you have it installed already, click on this link... [url=http://localhost]http://localhost[/url] - if that pops up a new window with Windows malarkey about IIS then you have it running. If not you'll need to install it, or another application such as Apache, Tomcat, etc to get hosting ability.

By default, this uses a directory on your boot drive called inetpub. The standard setup looks like..

<i>
</i>C:
inetpub
wwwroot


Anything inside your wwwroot folder will be accessible (unless set otherwise) from a browser using http://localhost (or http://127.0.0.1/, http://yourcomputername/ or http://your.isp.given.ip.address)">http://your.isp.given.ip.address). So if you put a file called hello_world.html into there, you can see it by putting... http://localhost/hello_world.html ..into your browser. Make sure you use the http:// and not the direct C:inetpubwwwroothello_world.html path.

Phew, that was overly long description wasn't it? And that's just scraping the surface of IIS (it's merits and flaws could fill this site 10 times over). Anyway, once it's set up and you are using it, it becomes second nature. The benefits of using a hosting on your local machine will become apparent as you use it more so I won't go into those here. However the main difference is in the way the security model of IE sees the file sitting on localhost compared to your filing system.

Try it, and you'll see those annoying messages you see are gone.

Hope this helps.
Copy linkTweet thisAlerts:
@ricpDec 24.2006 — Ah, good one, Mr J.

I detest IE with a passion, so tend to find ways of resolving my issues without changing my vanilla settings, hence my more elaborate solution.
Copy linkTweet thisAlerts:
@z2daveauthorDec 24.2006 — Thanks for ultra quick replies, hardly had time for breakfast.

All noted and taken on board, but what happens the other end when a browser person views a web page from the int via an ISP, does he have to have these settings on his computer before the page shows correctly without the warnings?
Copy linkTweet thisAlerts:
@ricpDec 24.2006 — z2dave, no, the user seeing the file from their computer will be running the file in the same security zone as you would if you set it to run from your IIS. (ie: no messages)
Copy linkTweet thisAlerts:
@z2daveauthorDec 24.2006 — Thanks for all your helps, glad I joined forum. Happy Christmas & New Year.
×

Success!

Help @z2dave spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...