Click to See Complete Forum and Search --> : EASY Double Question!
petrocan
07-10-2003, 12:37 PM
How do have another window pop-up when a user loads a url.
Meaning the open "www.abc.com" and when the page loads it pops-up another internet window that shows a htm file "def.htm"? I don't want to have to click on anything, I just want it to pop up.
Second question, how do I make it so that "def.htm" has no scroll bars and is limited to a certain size.
I know these are very simple questions, but its been too long and I don't remember.
Any help would be greatly appreciated as always.
pc
mabbutt
07-10-2003, 01:04 PM
1st question:
http://www.dynamicdrive.com/dynamicindex8/popwin.htm
petrocan
07-10-2003, 01:35 PM
Thanks for the help Mabbutt, but that code is for pop-up window when a link is clicked...I just need the new window to pop-up without any clicking. Something like an "onLoad".
Still looking for help...thanks.
David Harrison
07-10-2003, 01:51 PM
Try this:
<html>
<head>
<title>Open def.htm in a pop-up window</title>
<script type="text/javascript"><!--
function opendef(){
def = window.open("def.htm", "popup", "scrollbars=0, resizable=0, status=0, width=200, height=200");}
//--></script>
</head>
<body onload="opendef();">
</body>
</html>
it's been tested in IE 6, Opera 7 and Netscape 7 but it doesn't work in Opera 7 for some reason.
Edit: When I say doesn't work in Opera 7 I just mean that the window can be resized (but I don't know about the scroll bars).
petrocan
07-10-2003, 02:40 PM
Thank you very much lavalamp, that works great.
Now on a side note...does anyone know how to set the size, scroll options within a ".htm" file...without setting load options in the previous ".htm" file like in lavalamps example.
David Harrison
07-10-2003, 02:53 PM
You could put:
<body scroll="no">
but I think that it's an IE only thing.
petrocan
07-10-2003, 03:05 PM
Its an internal site anyways and we all use IE so that works great. Thanks again, I really appreciate your help.
David Harrison
07-10-2003, 03:09 PM
Just happy to help.:)