PDA

View Full Version : Real Confused.. Please Read.


richard_r
07-03-2002, 06:11 AM
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!:thumbsup: :) :o :D :p

JSgamer2049
05-20-2004, 02:32 PM
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.

immedicable
05-20-2004, 02:58 PM
<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)