Sign in to follow this  
donf

No Display With Alternate Browsers

Recommended Posts

My charts seem to work fine with internet explorer but they do not display with FireFox, Chrome, or Safari. Can someone suggest what the problem might be?

Protected Sub Page_PreRenderComplete(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRenderComplete
	' Generate chart in Literal Control
	FCLiteral.Text = CreateCharts()
End Sub

Public Function CreateCharts() As String

	Dim strXML As String = ""

	If Session("Location") <> "--- Select Location ---" Then

		Dim oConn As SqlConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("TrafficCountsConnectionString").ConnectionString)
		'Dim SQL As String = "SELECT * FROM countmaster WHERE loc_ID = [" + Session("location").ToString + "] ORDER BY _year"
		Dim SQL As String = "SELECT * FROM countmaster WHERE (loc_ID = @Loc_ID) ORDER BY _year"
		Dim oCommand As New SqlCommand(SQL, oConn)
		oConn.Open()
		oCommand.Parameters.AddWithValue("@Loc_ID", Session("Location"))
		Dim oReader As SqlDataReader = oCommand.ExecuteReader

		strXML = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width='800' height='400' id='Column2D' > "
		strXML += "<param name='movie' value='FusionCharts/FCF_Column3D.swf?chartWidth=800&chartHeight=400' /> "
		strXML += "<param name='FlashVars' value=" + Chr(34)
		strXML += "&dataXML="
		strXML += "<graph caption='Historical Traffic Volumes' subcaption='" + tcSelector1.Street + " - " + tcSelector1.Limits + "' xAxisName='Year' yAxisName='Volume (ADT)' decimalPrecision='0' formatNumberScale='0'>"

		While oReader.Read()
			If oReader("validation") = True Then
				strXML += "<set name='" + oReader("_year").ToString.Trim + "' value='" + oReader("ADT").ToString.Trim + "' color='fFD8F8' />"
			Else
				strXML += "<set name='" + oReader("_year").ToString.Trim + "' value='" + oReader("ADT").ToString.Trim + "' color='AFD8F8' />"
			End If
		End While

		strXML += "</graph>" + Chr(34) + " />"

		strXML += "<param name='quality' value='high' /> "

		strXML += "</object>"

		oReader.Close()
		oConn.Close()

		Return strXML
	Else
		Return "Please select your count location"
	End If
End Function

 

Thanks

Share this post


Link to post
Share on other sites

Hey,

 

To display a Flash movie correctly in a browser, HTML page should contain specific tags that specify the Flash movie file to be opened and played.

 

To display the Flash charts across various browsers, there are two tags which are intended for it: <OBJECT> and <EMBED> tags. These two tags are required to display a Flash movie in different Internet browsers properly.

 

The <OBJECT> tag is used by Internet Explorer under Microsoft Windows and the <EMBED> tag is used by other browsers. Each of these two tags acts in the same way, however using only one tag may cause incompatibility of one of the browsers.

 

To ensure that most browsers will play your Flash movies, you should place the <EMBED> tag nested within the <OBJECT> tag. ActiveX-enabled browsers will ignore the <EMBED> tag inside the <OBJECT> tag.

 

Since, you have used only <OBJECT> tag, charts are rendered in Internet Explorer browser.

 

Please refer for more information at: http://docs.fusioncharts.com/free/Contents/FirstChart.html

 

Hope this helps.

Share this post


Link to post
Share on other sites

Hey,

 

To display a Flash movie correctly in a browser, HTML page should contain specific tags that specify the Flash movie file to be opened and played.

 

To display the Flash charts across various browsers, there are two tags which are intended for it: <OBJECT> and <EMBED> tags. These two tags are required to display a Flash movie in different Internet browsers properly.

 

The <OBJECT> tag is used by Internet Explorer under Microsoft Windows and the <EMBED> tag is used by other browsers. Each of these two tags acts in the same way, however using only one tag may cause incompatibility of one of the browsers.

 

To ensure that most browsers will play your Flash movies, you should place the <EMBED> tag nested within the <OBJECT> tag. ActiveX-enabled browsers will ignore the <EMBED> tag inside the <OBJECT> tag.

 

Since, you have used only <OBJECT> tag, charts are rendered in Internet Explorer browser.

 

Please refer for more information at: http://docs.fusioncharts.com/free/Contents/FirstChart.html

 

Hope this helps.

 

 

Thanks for the tip. I added this line:

 

strXML += "<embed src='FusionCharts/FCF_MSColumn2D.swf' flashVars='&dataURL=strXML&chartWidth=800&chartHeight=400' quality='high' width='800' height='400' name='Column2D' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"

just ahead of the object close tag but get an error that says "error loading data". I expect this is in the dataURL specification. How would you code this given that the data is all in the string? (See original post.)

Share this post


Link to post
Share on other sites

Hey,

 

strXML += "<embed src='FusionCharts/FCF_MSColumn2D.swf' flashVars='&dataXML=strXML&chartWidth=800&chartHeight=400' quality='high' width='800' height='400' name='Column2D' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"

 

Since, XML data has been directly sent to the browser, you would need to use dataXML method.

 

For more information, please refer at: http://docs.fusioncharts.com/free/Contents/HowFCWorksDXML.html

 

Hope this helps.

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