Solved

CFWINDOW wont center

Posted on 2011-03-16
20
565 Views
Last Modified: 2012-05-11
Cna someone please go to this link, click on an appointment and tell me why the CFwindow wont center?

Thanks

Judson
0
Comment
Question by:judsonmusic
  • 10
  • 8
  • 2
20 Comments
 
LVL 11

Expert Comment

by:Brijesh Chauhan
Comment Utility
link is missing ? can you post it again..
0
 
LVL 3

Author Comment

by:judsonmusic
Comment Utility
0
 
LVL 3

Author Comment

by:judsonmusic
Comment Utility
0
 
LVL 36

Expert Comment

by:SidFishes
Comment Utility
centers beautifully on a 1920x1080 screen :) How are you calling the window?

are you using ColdFusion.Window.create ?

some code will be required
0
 
LVL 11

Expert Comment

by:Brijesh Chauhan
Comment Utility
Does not center for me .. same resolution ... 1920 X 1080
Untitled.jpg
0
 
LVL 36

Expert Comment

by:SidFishes
Comment Utility
that's interesting - it centers for a blank appointment (since I was answering the other question that's what I had seen) however it does not center for an existing. The centering does not "stick" with browser resize thoough. I see the same thing as brij for existing

I do get an error in the window however File not found: /scheduler/AJAXtest.cfm

0
 
LVL 3

Author Comment

by:judsonmusic
Comment Utility
I have postted this page for testing...

http://www.servicemysite.com/scheduler/AJAXtest.cfm

this is as clean as it gets and it does not center???

Why??? This is very strange.

ALSO CLICK THE 2nd one. WHEN I TAKE THE URL OUT, IT WORKS...
0
 
LVL 3

Author Comment

by:judsonmusic
Comment Utility
OK, I figured out a work around

http://www.servicemysite.com/scheduler/AJAXtest.cfm

I first create the window, then load the content into it.

but does anyone know why this is happening?
0
 
LVL 3

Author Comment

by:judsonmusic
Comment Utility
CFWINDOW's CFSUCK! lol
0
 
LVL 36

Expert Comment

by:SidFishes
Comment Utility
it only sucks if you provide us code and we can't figure out what is going on :p
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 3

Author Comment

by:judsonmusic
Comment Utility
were you not able to rightclick and view source?
0
 
LVL 36

Expert Comment

by:SidFishes
Comment Utility
view source for any of the cfajax tags isn't helpful as it shows the js output created by CF and -not- the cf code that is used to create the widget which is what controls how it looks and acts.
0
 
LVL 3

Author Comment

by:judsonmusic
Comment Utility
here ya go buddy. sorry about that.
<cfajaximport tags="cfwindow">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
</head>
<body>
This window will not center with a url in it.
<cfform name="test">
    <cfinput type="button" name="x" value="Create Window" 
        onClick="ColdFusion.Window.create('Window1', 'This is a CF window',
        'blankPage.cfm',
        {height:300,width:400,modal:true,closable:false,
        draggable:false,resizable:false,center:true,initshow:true, closable:true})">
</cfform>
<br /><br /><br /><br />


This one centers without a url in it. Why?
<cfform name="test">
    <cfinput type="button" name="x" value="Create Window 2" 
        onClick="ColdFusion.Window.create('Window2', 'This is a CF window2',
        '',
        {height:300,width:400,modal:true,closable:false,
        draggable:false,resizable:false,center:true,initshow:true, closable:true})"
        >
</cfform>
<br /><br /><br /><br />

This is the fix. Create the window first, the load the contents.
<cfform name="test">
    <cfinput type="button" name="x" value="Create Window 3" 
        onClick="ColdFusion.Window.create('Window3', 'This is a CF window3',
        '',
        {height:300,width:400,modal:true,closable:false,
        draggable:false,resizable:false,center:true,initshow:true, closable:true});
        
        ColdFusion.navigate('blankpage.cfm', 'Window3');
        return false;
        
        
        "
        >
</cfform>
</body>
</html>

Open in new window

0
 
LVL 36

Expert Comment

by:SidFishes
Comment Utility
when I run that code on my local server, everything centers fine on all three buttons no matter what the width of the viewport.

I notice that you are applying styles to your cfwindow?  perhaps that's where the issue lies -  remove the style and see what you get

0
 
LVL 36

Expert Comment

by:SidFishes
Comment Utility
note: I'm running cf 8 if you're running 9 the default style may be different?
0
 
LVL 3

Author Comment

by:judsonmusic
Comment Utility
How am I applying styles to them?
0
 
LVL 36

Expert Comment

by:SidFishes
Comment Utility
ok well it may be a version difference but there formatting is different - you running 9?

Thought if you were applying css to the window that may be causing the issue




ex2.jpg
ex1.jpg
0
 
LVL 3

Author Comment

by:judsonmusic
Comment Utility
I am running 9 so what property coul I override?
0
 
LVL 36

Accepted Solution

by:
SidFishes earned 500 total points
Comment Utility
I'm still on 8 here but looks like cfwindow implementation in cf9 -does- cfsuck :)

http://www.coldfusionjedi.com/index.cfm/2009/10/27/Broken-cfwindows

Try Ray's fix and you might check adobe for any patches updates to cf9
0
 
LVL 3

Author Comment

by:judsonmusic
Comment Utility
Adobe should be paying us. Thanks man.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Today, I was working on some optimization and spam-stopping techniques when I encountered Ben Nadel's post to reduce spam feature using Math (http://www.bennadel.com/blog/197-How-I-Stop-Spammers-On-My-ColdFusion-Blog.htm). While this method is not o…
Hi. There are several upload tutorials using jquery and coldfusion. I found a very interesting one here Upload Your Files using Jquery & ColdFusion and Preview them (http://www.randhawaworld.com/) . I did keep the main js functions but made sever…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now