Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using APEX_JSON results in JavaScript and escaping quotes

LSDevSep 29 2015 — edited Sep 30 2015

I am currently generating JSON using the APEX_JSON package.  This works fine, however I am firing the following JavaScript on page load and cannot figure out how to escape the quotes.

function drawChart() {

        var jsonData = &P9_JSON.;

        var data = google.visualization.DataTable(jsonData);

        var options = {

          title: 'Test Chart',

          pieSliceText: 'value'

        };

        var chart = new google.visualization.PieChart(document.getElementById('piechart'));

        chart.draw(data, options);

      }

I am getting errors because " is changed to " in the generated javascript.  Any ideas how to replace these?  I tried using .replace but it didn't seem to work...

Thanks!

This post has been answered by mortus on Sep 29 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 28 2015
Added on Sep 29 2015
2 comments
218 views