View Full Version : DD Popup Window Generator

06-09-2005, 04:42 PM
DD Popup Window Generator

Hello :) Viewing the above page in IE 6.0., it opens fine, and without any error. When launching the popup via its link, also, no problems. When I add the code to my file, and only that script, I get the following "error" - an "information bar" below the Address bar that states:

To help protect your security, Internet Explorer has restricted this file from showing active content that could access your computer. Click here for options…

If I do not deal with that information bar error, then the link opens in the same window, rather than in a popup. Due to its graphic design, it's imperative to crop the page by putting it into its own window. Can anyone help me understand why it works online, but not with the same code, in the same browser, from my file?

Here is my code for fun:

<title>Title Changed</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link href="myCSS.css" rel="stylesheet" type="text/css">

<script language="javascript" type="text/javascript">
Author: Eric King
Url: http://redrival.com/eak/index.shtml
This script is free to use as long as this info is left in
Featured on Dynamic Drive script library (http://www.dynamicdrive.com)
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){

else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}

// -->


<BODY bgcolor="#D86600" leftmargin="0" topmargin="0" text=#440B01 link=#8E1600 vlink=#761200 alink=#8E1600>

<table width=100% height=100%><tr><td valign=center><center>

<a href="http://www.google.com" onclick="NewWindow(this.href,'Google','800','575','no','center');return false" onfocus="this.blur()">Google</a>



06-09-2005, 05:34 PM
IE6 security settings. I've been trying to figure out a good way of overriding them locally. You can set them for live browsing and the default settings allow 'active scripting' which, in this case, refers to javascript. It does serve as an illustration of what users with 'allow active scripting' set to 'prompt' will see. One way to override it locally is to save the live document to disk using IE6's 'save as' 'web page complete'. Another way is to use Firefox.

06-09-2005, 09:14 PM
Thank you for your input! I just tried resaving the document while in IE with the "complete" setting you mentioned, but to no better a result, unfortunately. :( I even tried saving, as such, before dealing with the info bar, and again, after dealing with it.. and neither did the trick. As for using Firefox.. I love it :) But, this is going to be launched from a CD and will be used by folks whom I'd rather not challenge with getting a different browser than likely IE.

Working with this, and collaborating with a colleague of mine, we are starting to wonder if the file comes from the net, then the code will work fine. If it is from a local source (aka on your hard drive, and likely, on a CD) then it will feel the threat is all the closer and go off on you. Any chance that's it?

EDIT: I just saved the file (of the above link) to my harddrive, relaunched, and it's fine :(

06-09-2005, 09:24 PM
Google for the phrase, Mark of the Web (http://www.google.co.uk/search?hl=en&q=%22mark+of+the+web%22). Including a specially formatted comment will prevent prompting for local files that contains scripts.


I think this was my 500th post. Yay me! :D

06-09-2005, 09:29 PM
Yeah, it is something like that, I guess. What I meant about saving the page as complete, you have to put the page up live on the internet first. Then when you save it complete it will have a comment near or at the top something like this:

<!-- saved from url=(0052)http://dynamicdrive.com/dynamicindex6/dhtmlcount.htm -->

You can then edit the file somewhat (paths to images and external scripts) and still retain the ability to launch it locally without it giving you that horrible info bar. I'm not sure if this ability will translate to other's computers or not and you may have to leave the page up live if you have an active internet connection. Something worth exploring at least.

06-10-2005, 02:32 PM
You guys are WONDERFUL :D Thank you, so very much!