[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1076
  • Last Modified:

Coldfusion 8 cfchart bleeds through modal cfwindow when opened in IE 8

Hi,
We're just about to upgrade to IE 8 here and I've been testing all the Coldfusion web apps to make sure no issues arise. So far only one has cropped up. In a nutshell I display an employee's current project load along with a pie chart that shows projects that will come due within the next 30 days broken down into 1 week sectors. They can review a specific project by clicking the project name and it will open up in a modal cfwindow.

The IE 8 Specific issue is that the pie chart stays on top so that it blocks that portion of the cfwindow screen and its contents. Below is a simplified version of how it is laid out in code. This has not been an issue in IE 6, which we are still on. We are using Coldfusion 8 on Windows 2003 web servers.

Things I have already tried are setting the Z-Index and repositioning the pie charts.

Any thoughts?

Cheers,
Ty

<cfpod title="My Work Load" height="700" width="900">
    <cfdiv id="MyWorkLoad">
        Projects are displayed with clickable links that open up in a cfwindow to review project
    </cfdiv>
     <cfchart pieslicestyle="solid" format="flash" showborder="no">
</cfpod>

<cfwindow name="ProjectReviewWindow" center="True" modal="true" draggable="true" closable="true" resizable="true" initShow="false"></cfwindow>
0
MedtronicVascSR
Asked:
MedtronicVascSR
  • 7
  • 5
1 Solution
 
Brijesh ChauhanStaff IT EngineerCommented:
Seems to be a issue while using FLASH Format, if you use format as JPG, it works correctly ...

Just did a simple test ..

<cfajaximport tags="cfform">

<cfpod title="My Work Load" height="700" width="900">
    <cfdiv id="MyWorkLoad">

		<cfform name="myform">
			<cfinput type="button" name="mybutton3" value="Add Experience" onclick="javascript:ColdFusion.Window.show('ProjectReviewWindow')">
   	 	</cfform>
    
    </cfdiv>
     <cfchart pieslicestyle="solid" format="jpg" showborder="no">
     </cfchart>
</cfpod>

<cfwindow name="ProjectReviewWindow" center="True" modal="true" draggable="true" closable="true" resizable="true" initShow="false">
	
    Project Details

</cfwindow> 

Open in new window

0
 
Brijesh ChauhanStaff IT EngineerCommented:
Here is how you can use the flash, you need to do some pre-processing.

1. Save the chart as Binary, then write it to a file .swf

2. Then Embed it, using wmode as TRANSPARENT

check out the below code.. it resolves the issue that you are having ...

<!--- Do some preprocessing --->
     <cfchart pieslicestyle="solid" format="flash" showborder="no" name="data">
     </cfchart>
     <cffile action="write" file="#expandPath('./cfchart.swf')#" output="#data#">
<!--- End of saving chart as Binary --->

<!--- EMBED It as OBJECT and use wmode as transparent --->
<cfajaximport tags="cfform">

<cfpod title="My Work Load" height="700" width="900">
    <cfdiv id="MyWorkLoad">

		<cfform name="myform">
			<cfinput type="button" name="mybutton3" value="Add Experience" onclick="javascript:ColdFusion.Window.show('ProjectReviewWindow')">
   	 	</cfform>
        
        <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="300" height="300" id="mymoviename"> 
		<param name="movie" value="cfchart.swf" />  
		<param name="quality" value="high" /> 
		<param name="bgcolor" value="#ffffff" /> 
        <param name="wmode" value="transparent" /> 
		<embed src="cfchart.swf" quality="high" bgcolor="#ffffff" width="300" height="300" name="mymoviename" wmode="transparent" align="" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"> 
		</embed> 
		</object>

    
    </cfdiv>
</cfpod>

<cfwindow name="ProjectReviewWindow" center="True" modal="true" draggable="true" closable="true" resizable="true" initShow="false">
	
    Project Details

</cfwindow> 

Open in new window

0
 
_agx_Commented:
Save the chart as Binary, then write it to a file .swf

cfchart already generates a file on the server. Instead of generating another file it's more efficient to capture the output w/cfsavecontent. And insert the parameter with string functions.

<!--- capture generated html --->
<cfsavecontent variable="chartString">
    <cfchart pieslicestyle="solid" format="flash" showborder="no">
         <!--- more chart code --->
    </cfchart>
</cfsavecontent>

<!--- use string functions to add WMODE param --->
<cfset transParam = '<PARAM NAME="wmode" VALUE="transparent" />'>
<cfset chartString = reReplaceNoCase(chartString, "(<object [^>]+>)", "\1"& transParam, "all")>
<cfset chartString = reReplaceNoCase(chartString, "(<embed [^>]+)", "\1 wmode=""transparent"" ", "all")>

<!--- display the chart --->
<cfoutput>#chartString#</cfoutput>

Open in new window

0
Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

 
Brijesh ChauhanStaff IT EngineerCommented:
Instead of generating another file it's more efficient to capture the output w/cfsavecontent.

That is in case if you are NOT using NAME attribute in CFCHART, here i am using name attribute so binary is generated and NO OTHER FILE is created...
0
 
_agx_Commented:
<cffile action="write" file="#expandPath('./cfchart.swf')#" output="#data#">


When using cffile write another file IS created!
0
 
Brijesh ChauhanStaff IT EngineerCommented:
I am using NAME attribute in CFCHART

     <cfchart pieslicestyle="solid" format="flash" showborder="no" name="data">
     </cfchart>


This creates the BINARY of the chart,

then I use cffile to write this binary and save it as cfchart.swf.. so this is the only file created.....

I am not getting your point about 2 files...
0
 
_agx_Commented:
That is in case if you are NOT using NAME attribute in CFCHART

Not true.  CF creates a file in cache whether the "name" attribute is used or not.  
0
 
Brijesh ChauhanStaff IT EngineerCommented:
This is what the doc says, I wonder why they write about using cffile if cfcavecontent is efficient than it..


name
      
Optional
      
Page variable name; string. Generates the graph as binary data and assigns it to the specified variable. Suppresses chart display. You can use the name value in the cffile tag to write the chart to a file.

0
 
Brijesh ChauhanStaff IT EngineerCommented:
Generates the graph as binary data and assigns it to the specified variable.

So I am not sure how you are saying it creates a file in cache... what I understand it is a binary data and assigned to a variable..
0
 
_agx_Commented:
That's if you want to create a permanent file. The file CF creates is in the chart cache, which means it's temporary. All charting files are deleted automatically after a certain period of time.  
0
 
_agx_Commented:
what I understand it is a binary data and assigned to a variable..

Yes, but the binary data for that chart is read from a physical file in cache.
0
 
Brijesh ChauhanStaff IT EngineerCommented:
okay, I now understand your point...
0
 
MedtronicVascSRAuthor Commented:
Thanks for the 2 suggestions, non-flash and flash. I choose the non-flash (sub in .jpg) solution not simply because it was quick and easy, but since the entire web app itself is not fully flash it didn't make sense to get into the .swf business as you would when the enire app is built using Flex, etc.

If you have an idea as to the basic underlying reason IE 8 handles this situation differently then in previous versions that might be nice to conclude your thread.

Thanks again!

Cheers,
Ty
0

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

  • 7
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now