Solved

CFWINDOW wont center

Posted on 2011-03-16
20
576 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
How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This article  is about submitting  form through  ColdFusion.Ajax.submitForm to the action page and send a response back in JSON format which later can be decoded using ColdFusion.JSON.decode. By this way you can avoid the usual page refresh for subm…
Hi, I will be creating today a basic tutorial on how we can create a Mail Custom Function and use it where ever we want. The main advantage about creating a custom function is that we can accommodate a range of arguments to pass to the Function and …
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

726 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