Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Jul 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Internet Explorer window.open and IE

    The javascript works with firefox and safari but in internet explorer I can't get the href to popup in a new window or at the smaller size. I'm pretty green at Java script so any help would be greatly appresiated. Also, do I need the "SCRIPT LANGUAGE" in the head or can the javascript just be attached with the href?

    <html>
    <head>
    <title>Osagian site</title>
    <meta name="keywords" content="type in keep, words, that, will, pick up in a google search">
    <meta name="description" content="type in keep, words, that, will, pick up in a google search">
    <STYLE TYPE="text/css" MEDIA=screen>
    <!--
    load {padding-top: 0}
    h1 {padding-top: 10%; padding-left: 10%; font size: 25px; font-family: Helvetica, sans-serif; font-weight: normal; color: navy;}
    p {}
    -->
    </STYLE>
    <SCRIPT LANGUAGE="javascript1.2">
    function poponload()
    {
    "osagiansite=window.open(' ', 'osagian site',config='fullscreen=yes,location=no,resizable=no,scrollbars=no,menubar=no,status=yes,titlebar=n o,toolbar=no,width=800,height=600,left=240,top=100,breplace=true'); return false"}
    </SCRIPT
    ></head>

    <body>
    <div id="load">
    <h1><a href="Osagian%20site.html.html" onclick="javascript:window.open('www.osagian.com','Osagian Site',config='fullscreen=yes,location=no,resizable=no,scrollbars=no,menubar=no,status=yes,titlebar=n o,toolbar=no,width=800,height=600,left=240,top=100,breplace=true'); return false">Enter Site</a></h1>
    </div>
    </body>
    </html>

    Thanks for any help you can give.

  • #2
    Senior Coder
    Join Date
    Feb 2003
    Posts
    1,665
    Thanks
    0
    Thanked 27 Times in 25 Posts
    css
    Code:
    #load {padding-top: 0}
    h1 {padding-top: 10%; padding-left: 10%; font size: 25px; font-family: Helvetica, sans-serif; font-weight: normal; color: navy;}
    js
    Code:
    function poponload(url) {
    
    var osagiansite=window.open(url, 'osagian site','fullscreen=yes,location=no,resizable=no,scrollbars=no,menubar=no,status=yes,titlebar=no,toolbar=no,width=800,height=600,left=240,top=100'); 
    
    }
    markup
    Code:
    <div id="load">
    <h1><a href="osagian_main.html" onclick="poponload(this.href); return false;">Enter Site</a></h1>
    </div>
    but...

    Entry pages are a bad idea, particularly ones that are there simply to facilitate...
    ...Popup windows: These aren't a popular way to present the main body of a site.
    If you feel that you really want the site in a new window, at least offer users a link which opens in the current window.

    e.g.
    Code:
    <a href="osagian_main.html">Enter Site</a> (<a href="osagian_main.html" onclick="poponload(this.href); return false;">Open in new Window</a>)
    Meta Keywords are ignored by Google.
    Avoid having spaces in your file names (and try to keep file names to lowercase).
    Putting 'Enter Page' within h1 elements is a complete waste.

    There's quite a bit that's fundamentally missing the point with the code that you had.
    Last edited by Bill Posters; 07-31-2006 at 06:54 PM.

  • #3
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    IE needs to have the window name as one word rather than 2. Try this
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>Osagian site</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="Keywords" content="type in keep, words, that, will, pick up in a google search">
    <meta name="Description" content="type in keep, words, that, will, pick up in a google search">
    <style type="text/css">
    html, body {
    margin:0;
    padding:0;
    }
    h1 {
    padding-top: 10%; 
    padding-left: 10%; 
    font-size: 25px; 
    font-family: Helvetica, sans-serif; 
    font-weight: normal; 
    color: navy;
    }
    h1 a {
    color:navy;
    text-decoration:underline;
    background-color:inherit;
    }
    h1 a:hover {
    text-decoration:none;
    }
    </style>
    <script type="text/javascript">
    function poponload(url)
    {
    	osagiansite = window.open(url,'osagiansite','fullscreen=1,location=0,resizable=0,scrollbars=0,menubar=0,status=1,titlebar=0,toolbar=0,width=800,height=600,left=240,top=100');
    }
    </script>
    </head>
    <body>
    <div id="load">
    	<h1><a href="http://www.osagian.com" onclick="poponload(this.href);return false">Enter Site</a></h1>
    </div>
    </body>
    </html>
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #4
    New to the CF scene
    Join Date
    Jul 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The reason for the pop-up is because the new site is in flash and I'm trying to control the window size. I tried the code from both posts and the IE problem is still occurring. Any other suggestions? Like I said, this is all new for me so even critical feedback is wanted.

  • #5
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,593
    Thanks
    0
    Thanked 645 Times in 635 Posts
    Mobile phones and other PDA type devices don't have a very big screen and many wont understand flash. What will those visitors to your site see?

    What will blind people who visit your site hear in their web reader if all of the content is flash?

    What will people with javascript disabled see if you are relying on Javascript to open a new popup window?

    There goes at least 10 or 15% of your potential audience.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #6
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Quote Originally Posted by amber417
    The reason for the pop-up is because the new site is in flash and I'm trying to control the window size. I tried the code from both posts and the IE problem is still occurring. Any other suggestions? Like I said, this is all new for me so even critical feedback is wanted.
    I can understand Bill's not working because he had the space in the name in the JS function but mine should work as I did test it and it worked just fine in IE. Can you post a link to a test page? Also I was just going off your original JS function, you do realize that you told IE to go fullscreen?
    Last edited by _Aerospace_Eng_; 08-01-2006 at 06:35 AM.
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

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