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>
MedtronicVascSRAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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

_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

OWASP: Avoiding Hacker Tricks

Learn to build secure applications from the mindset of the hacker and avoid being exploited.

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...
_agx_Commented:
<cffile action="write" file="#expandPath('./cfchart.swf')#" output="#data#">


When using cffile write another file IS created!
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...
_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.  
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.

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..
_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.  
_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.
Brijesh ChauhanStaff IT EngineerCommented:
okay, I now understand your point...
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ColdFusion Language

From novice to tech pro — start learning today.