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  
Old 02-25-2008, 06:08 AM
BenR41 BenR41 is offline
D-Web Trainee
 
Join Date: Feb 2008
Posts: 4
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

Last edited by arjkhanna : 09-25-2009 at 04:21 AM.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 02-25-2008, 08:47 PM
prasannavigneshr prasannavigneshr is offline
D-Web Incredible
 
Join Date: Feb 2007
Posts: 1,264
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  
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 Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Doubt with check-in and options check-out arjkhanna Server Management 5 07-19-2009 07:37 PM
Confirm e-mail exists on user registration grgwhl PHP Programming 0 12-29-2008 12:22 PM
selecting check box in Gridview and displaying content for that checked check box hardikvaghela19 ASP and ASP.NET Programming 0 11-22-2008 10:31 AM
How to find whether a folder exists or not using c#? kingmaker C# Programming 2 08-23-2007 12:52 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 05:17 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.
Our Partners
One Way Moving Companies | Stamford Dentist | Euro Millions Lottery | Home Loans| Furniture

SEO by vBSEO 3.0.0