[Seaside] popup window

Cees de Groot cg at cdegroot.com
Wed Feb 18 10:15:38 CET 2004


On Wed, 2004-02-18 at 04:46, Julian Fitzell wrote:
> Actually, it appears not to be that simple.

It is if you can force the partial page out to the browser - we use that
trick in our domain shop (which is still VW .ssp based):

<script language="javascript" src="inc/utils.js"></script>
<script language="javascript">
    var winsizew = 360;
    var winsizeh = 350;

    var top  = (screen.height / 2) - (winsizeh / 2);
    var left = (screen.width / 2) - (winsizew / 2);
    var popup = window.open("domainShopPopup.ssp", "popup",
    
"toolbar=no,location=no,status=no,directories=no,menubar=no,scrollbars=auto,resizable=no,width="+winsizew+",height="+winsizeh+",top="+top+",left="+left);
     popup.focus()

</script>
 <!--#include virtual="inc/header.inc"-->

<% processor := session at: #processor.
   response flush.
   processor getAvailableTlds.
%>
<script language="javascript">
	popup.close();
</script>

'response flush' pushes out the HTML code so far and this triggers the
browser into parsing and executing the Javascript. 'processor
getAvailableTlds' is the bit that does the hard work, returning the
results in the page. When that's done, the last bit of javascript is
sent to the browser which closes the popup again. Works like a charm.




More information about the Seaside mailing list