p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning HTML, XHTML, CSS, and JavaScript (http://p2p.wrox.com/forumdisplay.php?f=541)
-   -   Script/ActiveX controls pop-up (http://p2p.wrox.com/showthread.php?t=78220)

grizgrad February 16th, 2010 05:39 PM

Script/ActiveX controls pop-up
 
Hopefully this is a quick one!

I'm just starting to get into web programming so forgive me if this is a silly question but I'm running into something very frustrating.

When I load a page I've written with a very simple external JavaScript file it pops up the...

"To help protect your security, Internet Explorer has restricted this webpage form running scripts or ActiveX controls that could access your computer..."

message.

I don't want my client's users to have to make that decision because it can be an alarming one to make (as evidenced by the last virus I had!!!)
Not sure what to do about this because I see other websites that have very similar functions (written differently, of course, and I'm sure that's where the problem lies) that don't elicit this message. FYI the script is a simple image rollover that runs on "onmouseover" and "onmouseout" events and simply changes the "src" attribute to make the image change.

Not sure if I should include all of my code or what one would need to help me with this issue. Let me know if more info is needed or maybe there's just a simple fix that I'm unaware of.

Thanks!

JBab February 16th, 2010 07:17 PM

Is your script going to be used on a website? I ask this because you often get these messages when you are testing scripts locally. Hopefully you will not get the message when it is on a web server.

You could also use CSS sprites for rollovers (they remove the need for JavaScript):

http://www.devarticles.com/c/a/Web-S...h-CSS-Sprites/

grizgrad February 16th, 2010 07:20 PM

Yes it will be on a server eventually. It didn't realize that would make a difference. Any idea why that is? Am I to assume that all Javascript code will run without that message once it's on a server?

JBab February 16th, 2010 07:31 PM

I'm not sure exactly why, but I think it is because your computer thinks that a web page is trying to run a script on your machine...

You can try adding a 'mark of the web' to the page, this might fix it locally.

http://msdn.microsoft.com/en-us/libr...28(VS.85).aspx

andypandyrox456 April 1st, 2010 11:04 PM

I also had the same problem. But mine was a bigger issue - one of the codes wouldn't appear. The code that didn't work was a VBScript code in which you would type your name, and it would say "Hello, (name here), and welcome to this website!"
I had to verify that the website was a safe website on my computer, and then it worked. I didn't get the pop up messages either. However, on other websites they did get those pop up messages, and even if they clicked OK on the pop up message, that specific code didn't work. I told them to verify the site, since it's a safe site, but I don't have that large an audience anyway, so for me it's fine. Also, you don't need to have that code on the website, it's just something extra.
However, I do hope to get an answer on how to block this somehow!


All times are GMT -4. The time now is 06:39 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.