Web Analytics Made Easy -
StatCounter Real Confused.. Please Read. - CodingForum

Announcement

Collapse
No announcement yet.

Real Confused.. Please Read.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Real Confused.. Please Read.

    I would like to know if anybody out there knows how to

    1 autoload a chromless window
    2 remove all - no scrollbar, statusbar, menu - none of that
    3 size the window to fit an any image size
    4 set cookie thanking visitor for coming to my site

    ***
    3 - image size is 541(l) x 95(w)
    4 - cookie message...

    Thank you for visiting http://www.geocities.com/npsguard/home.html. I hope that you enjoyed your visit, and time well spent.

    Have a nice day!

    My sites... relative sites to /home.html
    /html.html
    /css.html
    /js.html
    and many more soon to come!


    If you do, THANK YOU so MUCH!
    Younger is better, I think. Sometimes.

  • #2
    This should be the body of your index.html

    <body onload="popup()">
    <script>
    window.open("the_window's_url", "Optional window name", 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=95,height=541, left=0,top=0');
    </script>
    </body>

    That will open the page in its own window. If you want to close the old window that has all the stuff you don't want, used window.cose()

    I don't remember resizing right off hand, but cookies I do.

    <script language="javascript">
    if (document.cookie != "")
    {
    var mycookie = document.cookie;
    var firstchar = mycookie.indexOf("your_cookie");
    if (firstchar != -1)
    {
    var the_cookie = document.cookie;
    var the_cookie = unescape(the_cookie);
    var broken_cookie = the_cookie.split("/");
    var one_cookie_up = broken_cookie[0];
    var two_cookie_up = broken_cookie[1];
    }
    }
    </script>
    <script language="javascript">
    function write_cookie()
    {
    var the_cookie = "your_cookie=" + escape("message_one" + "/" +
    "message_two" + "/")
    var the_cookie2 = the_cookie + ";expires=";
    var the_cookie3 = the_cookie2 + "fri, 31-dec-2020 12:00:00 gmt;";
    document.cookie = the_cookie3;
    }
    </script>

    That writes a cookie called "your_cookie" with value that will look like:
    message_one/message_two...
    and so on. You can read the cookie from the script above it. Hope this helps.

    Comment


    • #3
      Code:
      <script language="javascript">
      if (document.cookie != "")
      {
      var mycookie = document.cookie;
      var firstchar = mycookie.indexOf("your_cookie");
      if (firstchar != -1)
      {
      var the_cookie = document.cookie;
      var the_cookie = unescape(the_cookie);
      var broken_cookie = the_cookie.split("/");
      var one_cookie_up = broken_cookie[0];
      var two_cookie_up = broken_cookie[1];
      }
      }
      function write_cookie()
      {
      var the_cookie = "your_cookie=" + escape("message_one" + "/" +
      "message_two" + "/")
      var the_cookie2 = the_cookie + ";expires=";
      var the_cookie3 = the_cookie2 + "fri, 31-dec-2020 12:00:00 gmt;";
      document.cookie = the_cookie3;
      }
      function resizeimage(fnheight,fnwidth){
         document.getElementById("img1").height = fnheight;
         document.getElementById("img1").width = fnwidth;
      }
      </script>
      there's the resize (i hope.. untested)

      Comment

      Working...
      X