IT Community - Software Programming, Web Development and Technical Support

Check to see if a cfwindow exists

This is a discussion on Check to see if a cfwindow exists within the ColdFusion Programming forums, part of the Web Development category; Check to see if a cfwindow exists When a window gets created by <cfwindow> coldfusion gives it a ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > ColdFusion Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 02-25-2008, 06:08 AM
BenR41 BenR41 is offline
D-Web Trainee
 
Join Date: Feb 2008
Posts: 5
BenR41 is on a distinguished road
Default Check to see if a cfwindow exists

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
<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:t rue })
// 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>

Good Luck
Ben
Lts Media Ltd.
LTS Media:: Strategic Online Planning & Project Management
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 02-25-2008, 08:47 PM
prasannavigneshr prasannavigneshr is offline
D-Web Incredible
 
Join Date: Feb 2007
Posts: 1,316
prasannavigneshr is on a distinguished road
Send a message via MSN to prasannavigneshr
Default Re: Check to see if a cfwindow exists

Hi Ben,

Thanks for the work around...
__________________
Prasanna Vignesh
MCPD | Web Developer
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-24-2008, 12:17 AM
iceman88 iceman88 is offline
D-Web Trainee
 
Join Date: Jun 2008
Posts: 4
iceman88 is on a distinguished road
Default Re: Check to see if a cfwindow exists

This thread helped a lot. Thanks to the guys and more power.
Great thing this site is.
Thanks very much..

Cool Financing Deals/Big Auto Discounts
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find whether a folder exists or not using c#? kingmaker C# Programming 2 08-23-2007 12:52 AM
check points simplesabita Testing Tools 1 08-22-2007 03:10 AM
TFS check-in problem arjkhanna ASP and ASP.NET Programming 9 08-16-2007 09:06 AM
How may Check points available in QTP with Example? sundarraja Testing Tools 1 08-14-2007 04:10 AM
Web content check tripnautic HTML, CSS and Javascript Coding Techniques 2 05-01-2007 05:56 AM


All times are GMT -7. The time now is 10:02 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0