Solved

CFWINDOW wont center

Posted on 2011-03-16
20
572 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
ID: 35153730
link is missing ? can you post it again..
0
 
LVL 3

Author Comment

by:judsonmusic
ID: 35153751
0
 
LVL 3

Author Comment

by:judsonmusic
ID: 35153756
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 36

Expert Comment

by:SidFishes
ID: 35156797
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
ID: 35156863
Does not center for me .. same resolution ... 1920 X 1080
Untitled.jpg
0
 
LVL 36

Expert Comment

by:SidFishes
ID: 35156991
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
ID: 35157329
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
ID: 35157461
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
ID: 35157488
CFWINDOW's CFSUCK! lol
0
 
LVL 36

Expert Comment

by:SidFishes
ID: 35158031
it only sucks if you provide us code and we can't figure out what is going on :p
0
 
LVL 3

Author Comment

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

Expert Comment

by:SidFishes
ID: 35158161
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
ID: 35158207
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
ID: 35159650
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
ID: 35159656
note: I'm running cf 8 if you're running 9 the default style may be different?
0
 
LVL 3

Author Comment

by:judsonmusic
ID: 35159700
How am I applying styles to them?
0
 
LVL 36

Expert Comment

by:SidFishes
ID: 35159823
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
ID: 35159845
I am running 9 so what property coul I override?
0
 
LVL 36

Accepted Solution

by:
SidFishes earned 500 total points
ID: 35159913
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
ID: 35159942
Adobe should be paying us. Thanks man.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hi, Even though I have created this Tutorial on My personal Blog, Some people might not able to find my website, So here i am posting it again Today, from the topic it is very clear that i will be showing you here the very basic usage of how we …
I spent nearly three days trying to figure out how incorporate OAuth in Coldfusion for the Eventful API. Hopefully, this article will allow Coldfusion Programmers to buzz through the API when they need to. Basically, what this script does is authori…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

813 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

16 Experts available now in Live!

Get 1:1 Help Now