Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

CFWINDOW wont center

Posted on 2011-03-16
20
Medium Priority
?
589 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
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 2000 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

PROBLEM:  How to open a cfwindow or run a function on double click of a cfgrid row. One of my clients wanted to be able to double click on a row item to get more detailed information about a transaction and to be able to modify the line items i…
Recently while working on a project I got a very annoying cfdocument has no body error message. I had never seen this error before. So I checked the code. The code was pretty simple; it was Just showing me the cfdocumnt tag and inside that tag a …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

610 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