And when you use a javascript function to open the window you can then use 
<A HREF="#" onclick="javascript:window.close();">Close Window</A>
  (or this href around some image) to close it.

Or using the following snippets of code in the <BODY> tag you can make it 
so that
- they click anywhere to close the window: onClick="self.close()"
- or click on the window behind to close the pop-up: onBlur="self.close()"

OR if you want it to close if they don't action whatever you have suggested 
in the pop-up window use: <INPUT TYPE="button" VALUE="Cancel" 
onClick="self.close(); return false;" ID="cancel">

lots of options for different needs - isn't javascript wonderful... wish I 
knew more of it.
Garth


At 11:06  9/09/02, you wrote:
>Here is my favorite function for pop up windows. It centers the window
>in the middle of the screen. Put this in the header of your html page:
>
><script language="JavaScript" type="text/JavaScript">
><!--
>function displayWindow(theURL,winName,width,height,features) { //v3.1
>// Made by Eddie Traversa modified from Macromedia Code
>// http://nirvana.media3.net/
>     var window_width = width;
>     var window_height = height;
>     var newfeatures= features;
>     var window_top = (screen.height-window_height)/2;
>     var window_left = (screen.width-window_width)/2;
>     newWindow=window.open(''+ theURL + '',''+ winName + '','width=' +
>window_width + ',height=' + window_height + ',top=' + window_top +
>',left=' + window_left + ',features=' + newfeatures + '');
>     newWindow.focus();
>}
>//-->
></script>
>
>Then, I assume you want to load the pop up when the page loads. So you
>have to use the onLoad command in the <body> tag like so:
>
><body
>onLoad="displayWindow('theUrl.html','popUp','500','400','status=yes,scro 
>llbars=yes,resizable=yes')">
>
>This will open a pop up window with the url "theUrl.html", a size of
>500x400, and the included options. You can change the size, the url,
>and the options to your heart's content.
>
>Robert.
>
>On Monday, September 9, 2002, at 08:29  AM, Fogelson, Steve wrote:
>
>>What is the best technique (sample code please) to invoke a popup menu
>>(sized correctly) when a product is selected in a storefront. I want
>>the
>>usual product  page to appear first and then a popup menu to appear on
>>top
>>of it with special instructions.
>>
>>Thanks
>>
>>Steve Fogelson
>>Internet Commerce Solutions
>>_______________________________________________________________________ _
>>TO UNSUBSCRIBE: send a plain text/US ASCII email to
>>[EMAIL PROTECTED]
>>                 with unsubscribe witango-talk in the message body
>
>--
>
>Robert Garcia
>BigHead Technology
>2781 N Carlmont Pl
>Simi Valley, CA 93065
>Phone 805.522.8577
>http://www.bighead.net/
>http://www.theradmac.com/
>[EMAIL PROTECTED]
>
>________________________________________________________________________
>TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
>                with unsubscribe witango-talk in the message body

________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
                with unsubscribe witango-talk in the message body

Reply via email to