Results 1 to 6 of 6

Thread: DD Popup Window Generator

  1. #1
    Join Date
    Jun 2005
    Location
    Ontario
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default DD Popup Window Generator

    DD Popup Window Generator
    http://www.dynamicdrive.com/dynamicindex8/popwin.htm

    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:

    <html>
    <head>
    <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){
    if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random(

    )*((screen.height-h)-75)):100;}
    if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
    else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
    settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=

    no,toolbar=no,resizable=no';
    win=window.open(mypage,myname,settings);}
    // -->
    </script>

    </head>

    <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>

    </center></td></tr></table>

    </body>
    </html>

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jun 2005
    Location
    Ontario
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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
    Last edited by moxy; 06-09-2005 at 09:18 PM.

  4. #4
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Google for the phrase, Mark of the Web. Including a specially formatted comment will prevent prompting for local files that contains scripts.

    Mike


    I think this was my 500th post. Yay me!
    Last edited by mwinter; 06-09-2005 at 09:33 PM. Reason: Self-indulgence :)

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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:

    HTML Code:
    <!-- 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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Jun 2005
    Location
    Ontario
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You guys are WONDERFUL Thank you, so very much!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •