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

  1. Lonnie
    Posted 3 years 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.


  2. kaoser@crebsol.com
    Posted 3 years ago #

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

  3. TobiasBg
    Plugin Author

    Posted 3 years ago #


    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


  4. Lonnie
    Posted 3 years 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 —

    <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.render(myChartId + 'container'); // ]]></script>
  5. TobiasBg
    Plugin Author

    Posted 3 years ago #


    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.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP-Table Reloaded
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic