Avatar of Kristen Jones
Kristen Jones
Flag for United States of America asked on

Classic ASP Image Stream - and InternetExplorer

I am trying to debug a problem with IE 9  I have an ASP page that streams an image

http://www.miamiconservancy.org/Water_Data/GWLevels/DataDisplayBetweenDates.asp?h=300&w=550&chart=&wellname=MON00001&datestart=3/12/2003&dateend=6/26/2012

This open fine in Chrome and Firefox but IE9 it tries to download the file or opens the image in notepad.  

This is Classic ASP using TeeChart

Chart.Export.Stream(stJpeg)
ASPMicrosoft IIS Web Server

Avatar of undefined
Last Comment
Kristen Jones

8/22/2022 - Mon
Scott Fell

Can you point to the example you were using at http://www.steema.com
Kristen Jones

ASKER
Actually here is an old post that I used to get the code done wow like 10 years ago but still in Google results
http://www.teechart.net/support/viewtopic.php?p=6234

The code has not changed in 10 years.. so there is something in this new IE that is causing it to act up.
Scott Fell

I have not used this charting program but maybe it has something to do with the binary write or the fact there is not an extension and ie9 does not know what do do with it.

I found the code below that writes the file as a jpg then uses the image.  I wonder if that will help.  
http://www.steema.com/support/faq/NewAX/FAQ_AX_ASPSPEC.htm

<HTML>
<%
dim filePath
dim httpPath
dim outputTeefile
dim outputJpegfile

' where server filepath locates to the same as URL below
filePath = "d:\data\WebTestFiles\"
httpPath = "http://128.0.0.55/testfiles/"
outputTeefile = "Chart" & Session.Sessionid & Replace(Time, ".", "") &
".tee"
outputJpegfile = "Chart" & Session.Sessionid & Replace(Time, ".", "") &
".jpg"
Set Chart1 = CreateObject("TeeChart.TChart")
Chart1.AddSeries(1)
Chart1.Aspect.View3D=False
'use your methods eg via DB to populate Chart or...
Chart1.Series(0).FillSampleValues 20
Chart1.Export.SaveToFile filepath & outputTeefile
Chart1.Export.SaveToJPEGFile filepath & outputJpegfile, False,
jpegBestQuality, 100, 450, 290
%>
<HEAD></HEAD><BODY>
<p>In the client section of the page you can display JPEG or Live
Charts.</p>

<SCRIPT LANGUAGE=VBSCRIPT>
Sub FillChart()
TChart1.Import.LoadFromURL("<%=httpPath%><%=outputTeefile %>")
End Sub
Sub TChart1_OnAfterDraw()
TChart1.Canvas.Font.Color = RGB(240,240,50)
TChart1.Canvas.Font.Bold=True
If TChart1.SeriesCount > 0 then
If TChart1.Series(0).Count > 0 then
TChart1.Canvas.TextOut TChart1.Axis.Left.Position, _
TChart1.Axis.Top.Position - 18, _
"Max point: " & TChart1.Series(0).YValues.Maximum
End if
End if
end sub
</SCRIPT>

<p>Here loading the Chart with a button (or could use IE Window_Onload
event):</p>
<p><input type="button" value="Populate Chart" onclick="FillChart"
name="cdmChart1"></p>

<OBJECT ID="TChart1" WIDTH=450 HEIGHT=290
CLASSID="CLSID:008BBE7E-C096-11D0-B4E3-00A0C901D681">
</OBJECT>

<IMG SRC=<%=httpPath%><%=outputJpegfile%>> </A>

</BODY></HTML>

Open in new window


There are so many good javascript charting scripts now  you can integrate with asp or any language, perhaps it would be easier to start with new graphs unless you have a lot of pages.

https://developers.google.com/chart/

http://code.google.com/p/flot/

http://www.jqplot.com/
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
ASKER CERTIFIED SOLUTION
Kristen Jones

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Kristen Jones

ASKER
I accepted mine because it was the correct solution.