When a window gets created by <cfwindow> coldfusion gives it a unique name and 
not the name you assigned it.

I have found a work around in the way of checking for the title of the window 
as when you create a cfwindow the window title div get the id of 
yourwinname_title.

Example javascript

<cfajaximport tags="cfwindow"/>
<cfparam name="property_id" default="pr1">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
 <script language="javascript">
function createphloadwin() {
 if(document.getElementById('mywindow_title')) {
        var x = "true";
        // Show the window
        ColdFusion.Window.show("mywindow");
 } else {
        var x = "false";
        // Create a new window
        ColdFusion.Window.create("mywindow", "Upload Photos", "", 
{height:250,width:400,closable:true,draggable:true,resizable:false,center:true,initshow:true,modal:true
 })
        // Put your content in the window or you can assign the url in the 
ColdFusion.Window.create()
        document.getElementById('mywindow_body').innerHTML = 'My Window 
content';
 }
 alert(x);
 }
 </script>
</head>

<body>
<a href="javascript:createphloadwin();">Check for window</a>
</body>
</html>




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:299019
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to