WordPress.org

Ready to get started?Download WordPress

Forums

WP-Table Reloaded
[resolved] Using Javascript inside a table cell (5 posts)

  1. Lonnie
    Member
    Posted 1 year ago #

    I'm trying to place a fusionchart inside a table cell but the plugin seems to not allow javascript. Is there a workaround? Thanks.

    http://wordpress.org/extend/plugins/wp-table-reloaded/

  2. kaoser@crebsol.com
    Member
    Posted 1 year ago #

    i added some meta box.But short code is not working in the meta box.
    Please HELP me!!!!!!!!!!!

  3. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    WP-Table Reloaded does actually not make a difference on what kind of code or content you enter into a table cell. For code, like JavaScript, there is however one (yeah, annoying...) thing to note: You can not any manual line breaks in the code, as those get transformed to HTML <br /> tags automatically (which breaks the JS code).
    Could this be the case here? If not, what exact outcome do you experience when adding JS code to a cell? Can you maybe post a link to your table?

    @kaoser: I will answer your question in the other thread at http://wordpress.org/support/topic/plugin-wp-table-reloaded-about-short-code

    Regards,
    Tobias

  4. Lonnie
    Member
    Posted 1 year ago #

    I wish I could post the table – but this client has confidential information and the site is not public.

    I tried removing the line breaks but it still doesn't work. I can take the code out of the table and place it in the page and it works fine.

    Any help is appreciated, thanks.

    The code is —

    <div>
    <script type="text/javascript">// <![CDATA[
    var myChartId = 'chart3';
    var myChartSWF = '../../../../../fusion/charts/Pie2D.swf';
    var myChartWidth = '280';
    var myChartHeight = '280';
    var myDataXML = '../../../../../fusion/data/EAI 1000 Chart.xml';
    document.write('<span id="' + myChartId + 'container">')
    var chartObj = new FusionCharts(myChartSWF, myChartId, myChartWidth, myChartHeight);
    chartObj.setDataURL(myDataXML);
    chartObj.render(myChartId + 'container'); // ]]></script>
    </div>
  5. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    I can't really see why this should not work - if everything is written in one line...

    You might want to check the page with a tool like the Chrome Developer Tools, to see if there are JavaScript errors reported.

    Regards,
    Tobias

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic