Sign in to follow this  

Javascript error in IE, but everything working with FF

Recommended Posts





I've recently purchased FusionCharts v3 and i am very happy with it. However, i can't get the following working in IE7, however it does work perfectly in Firefox;




When i'm rendering a chart i automatically render the image, save it to disk and add it to a PDF file. This works perfectly in Firefox however in internet explorer FC_Rendered wasn't fired.




Also, a javascript error is raised when the RegisterwithJS flag is set to true (Using 2.0 here). The error is ')' is expected.




I've tried several different approaches but I just can't get it to work properly.




Side note: Right clicking the image and saving it does work in IE7.






This is how i render the chart:




       Dim oConn As New SqlConnection(ConfigurationManager.ConnectionStrings("SQLConnection").ConnectionString)

       Dim cmd As New SqlCommand("EXEC Rapport_AantalLeerlingen @SchoolID", oConn)

       cmd.Parameters.Add("@SchoolID", Data.SqlDbType.Int)

       cmd.Parameters("@SchoolID").Value = Session("SchoolID")


       Dim sqlReader As SqlDataReader = cmd.ExecuteReader

       Dim xmlData As New StringBuilder

       xmlData.Append("<chart imageSave='1' imageSaveURL='Rapporten/FusionChartsSave.aspx' palette='1' canvasPadding='15' caption='Aantal leerlingen' xAxisName='Periode' yAxisName='Aantal' showValues='1' decimals='0' formatNumberScale='0' useRoundEdges='1'>")

      While sqlReader.Read

           xmlData.Append("<set label='" & sqlReader("Omschrijving") & "' value='" & sqlReader("Totaal") & "'/>")

       End While



       Dim sChartID = "nosave"

       If Session("CreatingRapport") = True Then

           Session("CurrentRapport") = "page1"

           Session("PagesForRapport") = Replace(Session("PagesForRapport"), "page1,", "")

           sChartID = "tosave"

       End If

       chart.Text = RenderChartHTML("../Charts/Line.swf", "", xmlData.ToString(), sChartID, "600", "350", False, True)




Thank you,





Share this post

Link to post
Share on other sites





I'm using the js file that came with the download after i purchased the license.


I'm using prototype and scriptaculous for the ajax part.









Share this post

Link to post
Share on other sites

Problem solved.




I had to change the following to make it work:




chart.Text = RenderChartHTML("








chart.Text = RenderChart("




The flash needs to be activated when using RenderChartHTML and this is handled with the other function.









Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this