Only tested on IE6:

Two pages, temp.cfm and temp2.cfm

temp.cfm:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
        <title>Untitled</title>
        <script type="text/javascript">

                function pageLoaded() {

                        window.onfocus = function() {
                                alert("WE HAVE FOCUS");
                        };

                        window.onblur = function() {
                                window.close();
                        };

                }

        </script>
</head>

<body onload="pageLoaded();">

</body>

</html>


temp2.cfm

<script>
        window.open("temp.cfm", "aNewWindow");
</script>


Seems to work but I'd test a fair bit :O)

Adrian Lynch
http://www.halestorm.co.uk/

Spring clean out:
http://www.adrianlynch.co.uk/selling/

-----Original Message-----
From: Eric Roberts [mailto:[EMAIL PROTECTED]
Sent: 29 January 2006 21:11
To: CF-Talk
Subject: OT: Javascript question...or suggestion where to go to get
answer


I have a JavaScript dilemma in one of my CF apps and I am not sure how to
solve it.  We have popup that is used to modify some values in the database
before running a report.  We want this popup to close if you click on
another window.  I tried putting close in an onBlur event as part of the
body tag, but then when I click on any location within the window, it
closes...I guess because when you focus on one element, you are blurring
another.  Anyone have any suggestions on how to accomplish this or where I
can go to get some help with this?  Any help would be greatly appreciated.

Blessings,
Eric




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230703
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to