EASY Double Question!

liunx

Guest
How do have another window pop-up when a user loads a url.<br />
<br />
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.<br />
<br />
Second question, how do I make it so that "def.htm" has no scroll bars and is limited to a certain size.<br />
<br />
I know these are very simple questions, but its been too long and I don't remember.<br />
<br />
Any help would be greatly appreciated as always.<br />
<br />
pc<!--content-->1st question:<br />
<br />
<!-- m --><a class="postlink" href="http://www.dynamicdrive.com/dynamicindex8/popwin.htm">http://www.dynamicdrive.com/dynamicindex8/popwin.htm</a><!-- m --><!--content-->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".<br />
<br />
Still looking for help...thanks.<!--content-->Try this:<br />
<br />
<html><br />
<head><br />
<br />
<title>Open def.htm in a pop-up window</title><br />
<br />
<script type="text/javascript"><!--<br />
<br />
function opendef(){<br />
<br />
def = window.open("def.htm", "popup", "scrollbars=0, resizable=0, status=0, width=200, height=200");}<br />
<br />
//--></script><br />
<br />
</head><br />
<br />
<body onload="opendef();"><br />
<br />
</body><br />
<br />
</html><br />
<br />
it's been tested in IE 6, Opera 7 and Netscape 7 but it doesn't work in Opera 7 for some reason.<br />
<br />
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).<!--content-->Thank you very much lavalamp, that works great.<br />
<br />
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.<!--content-->You could put:<br />
<body scroll="no"><br />
<br />
but I think that it's an IE only thing.<!--content-->Its an internal site anyways and we all use IE so that works great. Thanks again, I really appreciate your help.<!--content-->Just happy to help.:)<!--content-->
 
Back
Top