Using Fusion Charts Free in editor

Last post 08-19-2008, 2:11 AM by acyssfx. 7 replies.
Sort Posts: Previous Next
  •  08-13-2008, 2:55 AM 42926

    Using Fusion Charts Free in editor

    I am playing with a Fusion Chart (http://www.fusioncharts.com/free/) object in the editor.  I have added a new toolbar button, show the dialogue box using editor.ShowDialog()  (I would like a list of all parameters for this function).
    The dialog opens, I do my thing on the page and the chart is added to the editor on the save.  
    My problem now is editing the chart (ie: re-opening it).  It is a html object, I can click on it and select it and then using the code below can get a handle to it.  But it says it is a Control. 
       var editor = CuteEditor_GetEditor(button);
       var editdoc = editor.GetDocument();
       alert(editdoc.selection.type);
     
    I am aware that this is for IE and there is code around to get the html, but it does not work for controls.       
    I would love to get the html for it as there are attributes I would like to access.  Speaking of which below is the HTML of the chart:
     
    <object codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" height="300" width="600" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" name="7">
    <param name="allowScriptAccess" value="always"   />
    <param name="movie" value="FusionCharts/FCF_Column3D.swf"   />
    <param name="FlashVars" value="&amp;chartWidth=600&amp;chartHeight=300&amp;debugMode=0&amp;dataURL=uploads/GraphXML/47/7.xml"   />
    <param name="quality" value="high"   /> <embed src="FusionCharts/FCF_Column3D.swf" flashvars="&amp;chartWidth=600&amp;chartHeight=300&amp;debugMode=0&amp;dataURL=uploads/GraphXML/47/7.xml" quality="high" name="7" allowscriptaccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width="600" height="300"> </object>
     
    I want to get the dataURL=uploads/GraphXML/47/7.xml info out so I know which xml file to read back in so the data can be changed and resaved.


    And on another note, the chart does not appear in the editor in Firefox 3.  I haven't looked into it yet, thinking it is a security issue. But any ideas why the <object does not show?

     
     
  •  08-13-2008, 2:35 PM 42943 in reply to 42926

    Re: Using Fusion Charts Free in editor

    >>And on another note, the chart does not appear in the editor in Firefox 3.
    To get the above chart show in firefox, you need to have <embed> tag.
     
    >>would love to get the html for it as there are attributes I would like to access.
     
    It's very hard to get those attributes.

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  08-13-2008, 6:33 PM 42947 in reply to 42943

    Re: Using Fusion Charts Free in editor

    I gave up trying to get the name of the xml, I am going to split up the xml data edit and the chart setup into 2 different dialogs.
    I was going to add a div around the chart and try and get the parent element of the selected control (ie the div) and have the xml name as part of the div.  But I couldn't be bothered.
     
    As for the not showing in firefox, there is an embed in the html.  I am no expert on adding swf's, is the embed wrong?
     
    Justin
  •  08-14-2008, 1:57 PM 42976 in reply to 42926

    Re: Using Fusion Charts Free in editor

    >>the chart does not appear in the editor in Firefox 3
     
    I tested your HTML code in this example:
     
     
    The HTML code is protected correctly.
     
    I suggest you contact the author of this control and ask them why the html code only works in IE.

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  08-14-2008, 6:55 PM 42983 in reply to 42976

    Re: Using Fusion Charts Free in editor

    Hi again,
     
    I have spotted the issue why firefox is not showing the charts.  When I paste (or even go to HTML view and change) the html for the chat, cute editor in firefox converts all the & to &amp;  While this seem correct, it breaks the chat.  IE leaves all the & as they are.
     
    I will have a look around for some setting to stop this, but if you know how to stop what I am assuming is encoding that would be great?
     
    Justin
  •  08-14-2008, 7:19 PM 42984 in reply to 42983

    Re: Using Fusion Charts Free in editor

    Justin,
     
    Set Editor.UseSimpleAmpersand Property to true then try again.

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  08-14-2008, 7:46 PM 42985 in reply to 42984

    Re: Using Fusion Charts Free in editor

    Hi Adam,
     
    Yes, I just saw that and I put it in and it has stopped the & from changing to &amp;  But still the charts are not showing.
    For the project I am doing I have an extra button to show a preview (including uploaded css/images/templates) and the chart now shows fine (I generate a html page which is shown inside a iframe), so it is only in the cute editor that it does not show.
     
    I am trying to get it on a live server, if you want to check it out.
  •  08-19-2008, 2:11 AM 43033 in reply to 42985

    Re: Using Fusion Charts Free in editor

    Just to let you know, I found the issue with Firefox.  The html gets put in with the embed tag ending with /> but for some reason in firefox the /> was getting converted to >, therefore no "end tag" for the embed. So I replace the /> with > myself and add a </embed> before the html is put into cute editor. 
     
    Now it just comes up with the Flash Icon, which I have read in other posts is done to stop firefox messing things up.
     
    So it is all good for now.
     
    Thanks
    Justin
View as RSS news feed in XML