•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ColdFusion section within the Web Development category of DaniWeb, a massive community of 373,932 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,218 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ColdFusion advertiser:
Views: 641 | Replies: 0
![]() |
•
•
Join Date: Feb 2008
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
Check to see if a cfwindow exists
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
Thanks
Ben
LTS Media Ltd.
>url snipped<
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
Javascript Syntax (Toggle Plain Text)
<cfajaximport tags="cfwindow"/> <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> <a href="javascript:createphloadwin();">Check for window</a>
Ben
LTS Media Ltd.
>url snipped<
Last edited by MattEvans : Feb 25th, 2008 at 10:48 am. Reason: Use [code] tags around blocks of code; don't post website URLs in a 'fake' signature.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb ColdFusion Marketplace
Other Threads in the ColdFusion Forum
- Previous Thread: Dynamic Image Resizing
- Next Thread: <cfquery> Error


Linear Mode