Karl`s PC Help Forums

Active X message
Quaver - 11-2-2008 at 15:30

I've succeeded on making a drop-down menu for my site.
But everytime the site opens it displays a Windows security message saying: To help protect your security, Internet Explorer has restricted ....

and when I click allow, this:
[bad img]http://i189.photobucket.com/albums/z80/qquaver/warning.gif[/bad img]

The menu works only after doing this. It's not a problem for me, but can be frightening for other people to my site.

Are there any way to avoid this?
I think rollover buttons are causing this:(
(I followed these steps, as I also have Dreamweaver 4: http://www.informit.com/articles/article.aspx?p=29835)


ErraticToad - 11-2-2008 at 15:42

The only real ways to stop the message are three-fold.

1. Don't use an ActiveX control
2. Lower your IE security settings sufficiently to allow it to run unhindered (not at all wise)
3. Don't use IE

Due to the the fact that ActiveX has been thoroughly abused by virus and malware authors down the years, most security software or browser settings will either disable or force you to acknowledge that you are running a potential security loop hole each time.

HTH?


Quaver - 11-2-2008 at 16:17

Quote:
Originally posted by ErraticToad
1. Don't use an ActiveX control

Are there another wayconfused2
Quote:
2. Lower your IE security settings sufficiently to allow it to run unhindered (not at all wise)

Not wise...:(
Quote:
3. Don't use IE

I can't control which browser my website readers use...


Quaver - 11-2-2008 at 16:23

This is NOT my source code, but a code taken from the example from Dreamweaver tutorial site (http://www.informit.com/articles/article.aspx?p=29835).
This page get's the warning message as well;)

<html>
<head>
<title>Creating DHTML Drop Down Menus in Macromedia Dreameaver (Article by Tony
Arguelles, on InformIT.com)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
<!--
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->

function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_showHideLayers() { //v3.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
obj.visibility=v; }
}
//-->
</script>
</head>

<body bgcolor="#B7A785" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('dropdown-sp1h.gif','dropdown-sp2h.gif','dropdown-sp3h.gif')">
<div id="Logo" style="position:absolute; left:0px; top:0px; width:100%; height:39px; z-index:1; background-color: #5E543C; layer-background-color: #5E543C; border: 1px none #000000"><img src="logo.gif" width="400" height="39"></div>
<div id="hidedropdown" style="position:absolute; left:-3px; top:23px; width:350px; height:172px; z-index:2; visibility: hidden"><a href="javascript:;" onMouseOver="MM_showHideLayers('hidedropdown','','hide','dropdown','','hide')"><img src="transparent.gif" width="350" height="172" border="0"></a></div>
<div id="mainnav" style="position:absolute; left:0px; top:47px; width:337px; height:22px; z-index:3"><img src="left-of-prod.gif" width="47" height="22"><a href="javascript:;" onMouseOver="MM_showHideLayers('hidedropdown','','show','dropdown','','show')"><img src="products.gif" width="83" height="22" border="0"></a><img src="support.gif" width="85" height="22"><img src="contactus.gif" width="122" height="22"></div>
<div id="logonavdivider" style="position:absolute; left:0px; top:39px; width:100%; height:8px; z-index:4; background-image: url(logo-links-sep-right.gif); layer-background-image: url(logo-links-sep-right.gif); border: 1px none #000000"><img src="logo-links-sep.gif" width="338" height="8"></div>
<div id="dropdown" style="position:absolute; left:44px; top:65px; width:128px; height:105px; z-index:5; visibility: hidden"><img src="dropdown-0.gif" width="128" height="14"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('sp1','','dropdown-sp1h.gif',1)"><img name="sp1" border="0" src="dropdown-sp1.gif" width="128" height="22"><img src="dropdown-1.gif" width="128" height="6" border="0"></a><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('sp2','','dropdown-sp2h.gif',1)"><img name="sp2" border="0" src="dropdown-sp2.gif" width="128" height="22"><img src="dropdown-2.gif" width="128" height="6" border="0"></a><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('sp3','','dropdown-sp3h.gif',1)"><img name="sp3" border="0" src="dropdown-sp3.gif" width="128" height="22"><img src="dropdown-3.gif" width="128" height="13" border="0"></a></div>
</body>
</html>


dr john - 11-2-2008 at 17:31

It is normal to get this message when YOU create a javascript and run it on YOUR PC. (or save a page from the net to your PC and open it) Visitors don't see that if you upload it to a web site. It's IE being careful and looking after you in case you've downloaded something bad.

Or if you have your security warnings set at paranoid level.

But you shouldn't be using all that javascript to make a drop-down menu. Use css and the tiny, tiny, son of suckerfish code.

Also I see you have images in there as your actual link and no text at all. Google will not be happy with that. Visually impaired users will not be able to use the menu as there is no text for a screen-reader to speak out. So it breaks the Disability Discrimination Act in the UK. If you want to change the "text" inside the image, you have to make a new image.

So I'd suggest learning how to use css, unordered lists and son of suckerfish to make accessible menus.

These pages for example use a tiny bit of javascript, and plain css for their menus. You can edit them by just typing in a different word for the page name link text.
http://www.windrushers.co.uk/ - the links take you to a second site, it is the code on the page above that I'm talking about.
http://www.windrushers.org.uk/Competitions/regionals2007/index.htm

http://www.sky-web.net/New%20Fintry/


Quaver - 11-2-2008 at 21:38

Quote:
Originally posted by dr john
Visitors don't see that if you upload it to a web site. It's IE being careful and looking after you in case you've downloaded something bad.

That's a relief:)
Quote:
But you shouldn't be using all that javascript to make a drop-down menu. Use css and the tiny, tiny, son of suckerfish code.

:(
Quote:
So it breaks the Disability Discrimination Act in the UK.

It's not a commercial site, but I see what you mean.
And I do have one blind friend...
Quote:
So I'd suggest learning how to use css, unordered lists and son of suckerfish to make accessible menus.

CSSshocked_yellow I've heard about that ... scary:(
Quote:
These pages for example use a tiny bit of javascript, and plain css for their menus. You can edit them by just typing in a different word for the page name link text.
http://www.windrushers.co.uk/ - the links take you to a second site, it is the code on the page above that I'm talking about.
http://www.windrushers.org.uk/Competitions/regionals2007/index.htm

http://www.sky-web.net/New%20Fintry/

kewl_glasses


ErraticToad - 12-2-2008 at 01:06

Neither my IE7 nor Firefox complain or fail to render that sample page correctly.

My settings - semi paranoid :)


dr john - 12-2-2008 at 01:32

CSS isn't scary at all.

If you have ever set a colour or font size or font family, css does that. Set a background image? Added a border? But it saves you having to set it every time you start a new paragraph or new page.

Controlling layouts with CSS is tricky to begin with, but there are lots of tried and tested layouts available and all you have to do is style them to be pretty. And a few tricks to avoid falling into traps.

CSS was very tricky when antique browsers such as IE5 or similar things were common. Now it is much easier to use.

Start with a tried and tested layout, and experiment a little bit. Don't try to re-invent the wheel, software re-usability is the goal of all good work.

Then, your imagination is the only limitation.

Besides, where is this website of yours anyway? ;)

PS Unfortunately, old versions of Dreamweaver (not our Dreamweaver, she's not old, the program) don't understand floats properly and mess up their design view a great deal, so you become a hand coder who tests the preview in a browser.


Dreamweaver - 12-2-2008 at 09:44

Quote:
Originally posted by dr john

PS Unfortunately, old versions of Dreamweaver (not our Dreamweaver, she's not old, the program) don't understand floats properly and mess up their design view a great deal, so you become a hand coder who tests the preview in a browser.


Funnily enough (as an aside) I remember bringing Karl a cup of coffee at his PC, To find him on MSN with someone.
The person had typed "I see you still have fat, bloated Dreamweaver"
Karl had some serious explaining to do lol.


Quaver - 12-2-2008 at 10:40

Quote:
Originally posted by dr john
Besides, where is this website of yours anyway? ;)

If I gave you the url, you'll know too much about me:D
Quote:
PS Unfortunately, old versions of Dreamweaver (not our Dreamweaver, she's not old, the program) don't understand floats properly and mess up their design view a great deal, so you become a hand coder who tests the preview in a browser.

Should I get a newer Dreamweaver? Is it Dreamweaver CS3?
Is it worth it? (I could get a student version for my sibling;))
http://www.amazon.co.uk/Dreamweaver-CS3-Student-Edition-PC/dp/B0012IOKH8


dr john - 12-2-2008 at 10:42

Introductory lessons in CSS

http://www.cssbasics.com
http://www.htmldog.com
http://www.westciv.com/style_master/house/index.html
(I use a different css editor to the one in the last tutorial, mainly because the last one time expires and TopStyle Lite, which I use when not hand coding, doesn't expire)

Useful tips
ALWAYS use an external css file.
Always start your css file with this line and then build up on it.
body { margin:0; margin:0}
This gets rid of some problems met when changing from one browser to another.
Don't add margins or padding to containers (divs), add them to the contents of the div instead eg to the <p>, <h2> <li> and so on. (same reason as above)
Add to that the font-family you wish to use for the majority of your work, and what your starting font size will be.

So it now becomes

body {
margin:0;
padding:0;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 90%;
}

Font families enable you to have a similar looking font if the user doesn't have the one you really want to use - say they use a different OS or older computer. Setting the size as a percentage means it can be re-sized by people with poor eyesight who have trouble reading it. By declaring your commonest font for the body, you get rid of a huge amount of inline code and make it so much easier to read the code to do other more exciting things. And your pages load faster. And the one file can be referred to on every page, no more selecting fonts every time you start a new page. (You can add a second css file for some special effects as well, just to keep it out of the main one and avoid messing things up.)

Gosh that is just soooo scary, isn't it.
But there is a bit more to it of course...

For example how to have all you content centred on the page: -
wrap it all in a div called, oh, how about, let me think, #wrapper,

<div id="wrapper">
all the rest of your content...
</div>

then add text-align:center; for the body's styles

and then style the wrapper

#wrapper {
text-align:left;
width: some value, either in pixels or percentages, but NOT 100% of course;
margin:auto;
}
Magic.
This works in every known browser that understands css.

You must be shaking with fear now, eh. No? Didn't think so.


LSemmens - 12-2-2008 at 11:53

Thanks, DW, I needed that. I had a friend ring me one night, on of my sons answered and yell out, "Dad, it's your girlfriend!" Deb rolled on the floor laughing, and I had lots of explaining to do to the friend.


SRD - 12-2-2008 at 12:25

Quote:
Originally posted by dr john
Introductory lessons in CSS.......
.......You must be shaking with fear now, eh. No? Didn't think so.
Except of course for this bit:
Quote:
body { margin:0; margin:0}
nananana


dr john - 12-2-2008 at 14:13

I can do css - it's typing that I find hard...
:bon)
for quaver's benefit, it should have said body {margin:0; padding:0;}, as it does in the next improvement suggested.

Dreamweaver CS3 is the latest version of DW. Never tried it though. I hand code a great deal now, in free text editors, and use DW for its superb and very smart built in ftp program, which beats all others out of sght/site.


Quaver - 12-2-2008 at 22:43

Thank you Dr.John. Had a look at all your links. I think I'll try with westciv tutorial which seems to show how to make css step by step;)


dr john - 13-2-2008 at 14:35

Test anything you create in Firefox first. Then check it in IE7 (most of the time it will look okay) and finally test it in IE6.
Any other order of checking your design is doomed to failure. Firefox is the most standards compliant of the big three browsers, it should always be your first test.