Hi folks

I wasn't sure which thread to put this in, so I've put it here - mods feel free to move it if necessary.

I'm wanting to add an "exit survey" on my site - a pop-up when a visitor leaves the site. I've found some resources, and I'm using a form generated over at Wufoo, but I can't seem to get the code integrated with the site. Any helpful tips or advice would be MUCH appreciated.

This is what I've got going so far.

on tpl_header.php, near the top, I have inserted this code:

Code:
<!--bof-exit survey-->
<script language="javascript">
<!-- begin
function openit(sURL){newwindow=open(sURL,"newwin","height=932, width=680, toolbar=0, location=0, status=1, scrollbars=1,resizable=1'");
// end -->
</script>
<!--eof-exit survey-->
on tpl_main_page.php I have entered the trigger:

Code:
<script type="text/javascript">var _sf_startpt=(new Date()).getTime()</script>
<body id="<?php echo $body_id . 'Body'; ?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?> onUnload="javascript:openit ('http://MYUNIQUECODE.wufoo.com/forms/RANDOMSTRINGOFNUMBERS/')">
the part in bold is the new section I added, because all sites recommended inserting it into the <BODY part of the tags.

I've tested it, and nothing happens. What am I missing? Any help would be MUCH MUCH MUCH appreciated!

Thanks!

Seven