CFCHART adding javascript JSON

I recently upgraded from CF9 to CF11 (development version) running on localhost and I'm having the following problem. I have a CFC that saves some data, creates some cfcharts and records them to disk. It is added at the beginning of the JSON object that is returned to the client, causing the ajax call to fail:

< script type = "text/javascript" > / * <! [CDATA [* / _cf_loadingtexthtml = "< img alt =" "' src='/CFIDE/scripts/ajax/resources/cf/images/loading.gif'/ > ';"]]

_cf_contextpath ="";

_cf_ajaxscriptsrc = "/ CFIDE/scripts/ajax."

_cf_jsonprefix ='/ /';

_cf_websocket_port = 8577;

_cf_flash_policy_port = 1243;

_cf_clientid = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx '; "[[/ *]] > * / < /script > < script type =" text/javascript"src="/CFIDE/scripts/ajax/messages/cfmessage.js "> < / script >

"< script type =" text/javascript"src="/CFIDE/scripts/ajax/package/cfajax.js "> < / script >

"< script type =" text/javascript"src="/CFIDE/scripts/chart/cfchart-server.js "> < / script >

This only happens when I run the code in the CFC that creates graphics. If I comment out, it works very well.

Post edited by: Carl Von Stetten (CFGRAPH changed to CFCHART in title)

My colleague came up with a work around for this. He suggested that I run the part of the code that generates the graphics in a separate thread and that seems to work. I guess everything that triggers CF to precede the return data has been bypassed by this.

Tags: ColdFusion

Similar Questions

  • adding javascript to the button in muse

    I have a Wazala widget, I'd like to add to my site, but do not use the Wazala button but use my own button to call the widget store. I found the instructions here: Customize the Widget button - Wazala Help Desk on how to do it but I can't make it work. I added the widget code on my site, but when I add the javascript code to one of my buttons it starts to turn into a http:// link and simply opens a new blank page. Can also advise me as to what I'm doing wrong? I don't know anything about the code, so if you could be clear as possible as to what I should do in muse would be great!

    Hi penny, I understand in fact or a fortiori technical support Wazala figured it out. E - mailer that the answer may be slightly different depending on your situation.

  • Adding JavaScript to several PDF using batch processing

    I am trying to add a Javascript to mulitple PDF that requires the script below.  I try to use the batch option, but may not know how to add the javascript code for the batch for her, to automatically added to each individual PDF.

    This JavaScript is a dynamic script that puts a watermark on the page with the current date:

    var cMyText = "VALID FOR 30 DAYS of" + util.printd ("mm/dd/yyyy", new Date);

    this.addWatermarkFromText({)
    cText: cMyText,.
    nRotation: 45,.
    cFont: "Helvetica-Bold",.
    nFontSize:24,
    aColor: color.gray,.
    Start: this.pageNum,.
    nOpacity:0.5});

    The script works when I add it manually in each PDF individual but want to use the batch for more than 500 PDF files.


    Thanks for the help,

    Brian

    "Document JavaScripts" - the Action Wizard command is unnecessary, since all this is invite you to manually enter the code for each file, that is the exact opposite of what should be an automated process.

    Fortunately, there is another way to do it, that does not involve user interaction. You can use the command execute JavaScript to add the code to your file. Basically, you can use it like this:

    function myCode() {}

    do something

    }

    this.addScript ("Scripts", myCode + "myCode();");

    This include the myCode function in the file and then call each time the file is opened.

    However, I would like to replace this.pageNum in your code with a real page (such as 0) number, since you do not know on what page the document will open.

  • JavaScript JSON and ApEx integration

    In the community of ApEx, I see a lot of developers to extend their applications with JavaScript and JSON libraries. I would do the same thing to enjoy all the beautiful widgets, gadgets and gizmos that have been developed in the world of script.


    What is advice to better introduce the use of a script library?

    Team ApEx Oracle has an official thought on the extension of the ApEx in a script library?

    Y at - it a library which is recommended?

    Team ApEx does intend to extend their own library users don't need to use 3 parties?

    Have others using these issues experienced the 3rd-party libraries related to upgrades of the ApEx?


    I need a solution that is solid as a rock (no bugs) and bearable. The apps I support now have over a thousand users. Applications run on our company intranet. It would be undesirable to make calls outside our network http.

    Kind regards
    Todd

    Todd,

    We have certainly will continue work on the library, with the main objective on the realization of full namespace (to reduce the risk of collisions with different libraries functions) and the integration of jquery (making use of the features of the great library of basic such as chaining DOM selectors, improved, etc., but not of jquery UI).

    While it is currently possible to integrate with other libraries and many people have had great results with it, there are other plans for the future which should make life easier. To know custom item types, which allows developers to more easily code and reuse 3rd widgets to party in their applications.

    Another plan is what we call "Dynamic action", which will allow developers to set declaratively in the APEX for example activation, deactivation, display client side logic and hiding items. It is about making life easier for developers who do not want to dirty their hands with JavaScript, but still want to achieve such functionality in their applications.

    But I do not think that we could reach a point where "users have no need to use 3 parties. We are not all things to all people, different people have different requirements and tastes. For this reason, providing the best scalability (through custom item types) is the goal.

    We will also improve the documentation on the library, since 3.1, we had a few docs in chapter API user guide, but we will look to improve it with more detailed in future examples.

    Hope this helps,
    Anthony.

  • GroupDataModel is not sorting when the data are added to Json

    If I have an empty Json and I add data to him one by one, everything works just fine, but when I have a data in Json it sort. Let's say that this is my json:

    [
       {
          "DateCreated" : 1383137332,
          "DateToFinish" : "1383137400",
          "Description" : "Task 3",
          "Status" : "1",
          "taskId" : "3"
       },
       {
          "DateCreated" : 1383137327,
          "DateToFinish" : "1383137400",
          "Description" : "Task 2",
          "Status" : "1",
          "taskId" : "2"
       },
       {
          "DateCreated" : 1383137321,
          "DateToFinish" : "1383137400",
          "Description" : "Task 1",
          "Status" : "1",
          "taskId" : "1"
       }
    ]
    

    sortingKey is set for "taskId" and sortedAscending is set to false "(false) setSortedAscending" but in the ListView, it indicates in order as 'Task1, Task2, Task3' growing. I filled out model json with:

     QVariant list = jda->load(QDir::currentPath() +
                                 "/app/native/assets/test.json");
    
        this->insertList(list.value());
    

    In addition, after I have load and insert json to the model, when I try to add a new model element, it adds properly in its place. He would add "task4' with the id" taskId: 2 "at the top of the JSON...»

    EDIT: "jda" is ' bb::data :: JsonDataAccess'

    Put 'setSortedAscending (false)' after insertion has solved, but I'll leave this open for explanation.

  • Adding a JSON string to a RESTful outgoing call in OSB 11.1.1.6

    Inside of my stream of messages of the Service Proxy (OSB 11.1.1.6), I have generated a JSON string and stored in a variable named $jsonReq.

    In my action of routing, I point to a Business Service that the Service Type is 'Messaging Service' with both Types of request/response as "Text" messages

    What is the right way to attribute the $jsonReq content of the variable for the body of the outgoing request (I'm making a POST)?

    I tried a number of configurations, but not prevail (although I see the content JSON when I throw out in a Log action), such as:

    Insert
    Expression: $jsonReq
    Location: as the first child of the
    XPath:.
    In Variable: coming out


    Please notify.

    Thank you
    Michael

    Use replace. / * in the variable body with $jsonReq choose replace entire node.

  • Adding Javascript to a Digital Signature

    Hi all

    I went through the forum for the good part of the last 2 days and have been unable to solve my problem (if it's fixable).  I wasn't really sure of this forum to post, but since he mainly a matter of Javascript and I'm not exerienced in Java, I've posted it here.

    I created a form with Acrobat Pro XI and will be read in drive X.  My goal is to be able to insert a digital signature in the menu forms in Acrobat and Digital Signature properties, signing tab, I would like to input Javascript in the "this script is run when the field is signed:" section.  This script would be to e-mail the document in PDF format, with all the fields of the form, locked or flattened.  If possible, I want to change the name of the document and add the specific email subject line.

    I tried to use the bu next script he errors on the cSubmitAs.

    this.submitForm ({cUrl: "mailto:mail@domain", cSubmitAs: 'PDF',})

    Any help would be greatly appreciated,

    Eric

    The script would be:

    for (var i = 0; i)< numfields;="" i="" +="1)">

    var fName = getNthFieldName (i);

    Make the readonly field

    getField (fName) .readonly = true;

    }

    This affects all areas, including buttons, read-only.

  • Adding javascript animation

    Hello

    Jeremy Clarkson's words "I was on the internet and I found it."

    Logo animated Atom

    Can I integrate this animation in a site created with the muse?

    You can of course!

    First, click on the button Show compiled in the demo CSS column

    Select all of the CSS code, and then copy it to the Clipboard

    Open the Page Properties in Muse

    According to metadata > HTML for the head, put an opening tag tag

    Close the Properties dialog box

    Back to the demo code

    Copy the HTML code

    Return to the Muse

    Go to object > insert HTML

    Paste it into the HTML code

    Click OK to add it

    You will see the atom in the framework that results. You will need to stretch and position the frame function.

    I hope this helps

    And on this bomb...

    David

    http://creativemuse.co

  • How to add the JSON.jar file in bb OS 4.5?

    Hi all

    I have a problem in the analysis of a json file in BlackBerry os 4.5 and 5.0. I added the JSON.jar file in my project. I am trying to execute that project throws "Eception Exception: java.lnag.NoClassDefFound Error". I think that the jar file does not work correctly. How to solve this problem?

    Thank you

    Yes, add org folder to the source of your application.

  • Flash actionscript to Javascript using HTML5 banners

    Hello

    I've been creating flash banners for the internet using Flash CS6 and Actionscript2. Today, I was told that I need to provide to HTML5.

    Of course, I know that actionscript does not work with HTML5 its all about Javascript.

    I have problems adding javascript for specific functions.

    For example I need the publicity to stop on the last image, unless the page is refreshed. In as2, you can use the stop(); query. I found some JS that is supposed to work

    / * JS

    This.Stop ();

    */

    This does not prevent my animation in a loop when I test it. I put this in the wrong place? At the moment I am writing this is in the Panel shares on the selected keyframe I want to stop the animation. Is this correct?

    Any help would be greatly appreciated

    Thank you

    I assume you are using the Toolbox to increase the power of the CS6 and not a newer version of Flash Pro. Might be interesting to read this article, in case there is something you have done differently:

    The box using Flash for CreateJS professional Toolbox | Adobe Developer Connection

    At the very least, that you use / * JS, while Grant is the use / * js. Don't know if it is case sensitive.

    In your browser, look at the Javascript error console, to see if there are errors happening.

  • When I add a javascript for printing, it won't run if the document is password

    I created a form field and added javascript to print 'printed' date whenever a document is printed.  It's on, or Web site, and we need to fix (but allow printing).  However, when I set the javascript code is blocked and it prints the date I tested it before getting the file (and not the current date).  Anyone know how to enable javascript when the document is secure?

    Thank you

    Dave

    You must allow the filling of forms.

  • JavaScript, interrupting the delicate design

    I added javascript on my site which is great and the site is still the answer, but I have to reload the page to see the site change proportions. Obviously, this is no right from the design point of view that the Web site will look terrible if you had to change your mode iphone portrait to landscape mode and site does not react until it is recharged. I think it might be a problem loading as I know that javascript increases the loading time of the Web sites. Take a look at btccs.co.uk and change the screen size and you'll see what I mean. Thank you

    Massive distortion occurs when images are enhanced beyond their original size.  It's even uglier on ultra wide TV or multiple screens.  This is not a good practice.

    Let's say you have a banner that is wide of 2000px.  The following CSS rule allows of descenders in proportion to the width of the viewport of the images, but high-end never beyond the native size of 2000px.

    IMG {max-width: 100%}

    The above rule is the default value in fluid grid Layouts + other executives RWD.  It works fine, I hope you don't ignore it in your HTML with the attributes height and width explicit img.

    Nancy O.

  • Reports: Javascript in the area on foot of page with links in cells

    Hi all!
    I need to put hyperlinks in my APEX (4.0) report and I read there is no direct option for IT... that's how I thought to do, so...


    My reports contains two columns:
    DEVICE and HEALTH.
    The first contains a string with the name of the device and the second is a number that is expected as in percent.

    I need channels in the DEVICE columns are also links to another APEX page where I have to generate a graph of "dynamic".


    That is: we can intend to a report that the DEVICE is '000 x 0' and line '30 HEALTH.
    APEX generate HTML code like this:

    < headers td = 'DEVICE' class = 'data' > 000 x 0 < table > < headers td = 'HEALTH' class = 'data' > < table > 30

    But I also need '000 x 0' to be a link to: "f?" p = 104:4:2205607043123699:THE_DEVICE:000 x 0 "."
    To say: the fourth page of my site of APEX, where "THE_DEVICE" is an APPLICATION_ITEM and contains the name of the device clicked.


    First thing I tried is to re - write pl/sql query to automatically returns the HTML for the link, such as:

    Select
    ''|| DEVICE of |'' as a PERIPHERAL,
    trunc (HEALTH, 2) than HEALTH
    of [...]

    But the APEX convert special characters to the & x; values:
    & amp; Lt; a href = & amp; quot; f? p = 104:4:2205607043123699:THE_DEVICE:000 & amp; quot; target = & amp; quot; _self & amp; quot; & amp; quot; & amp; GT; 000 & amp; Lt; /a & amp; GT;


    Second thing, I thought is to give a Unique ID to the region of the report ("ALARM_DEVICES_REG") and try to change this text dynamically by adding JavaScript to the footer area.

    I checked and found in this forum a JavaScript suggested to someone who has had a similar problem to mine, then I tried to adapt to my situation.
    The fact is that my JavaScript in the footer area does not seem to work at all! Or a simple document.write ("bye!"); COMAND!
    How possible?

    The JavaScript code, I tried to create could also contains errors, and it is the following:


    < script type = "text/javascript" >
    var y = document.getElementById('report_ALARM_DEVICES_REG')
    var x = y.getElementsByTagName ('TD');
    var s;
    If (x)
    {
    for (var i = 0; i < x.length; i ++)
    {
    s = x.item (i);
    If (s.GetAttribute ('headers') == 'DEVICE')
    {
    s.Data = replaceHtmlEntites (s.data);
    }
    }
    }
    < /script >

    I noticed the innerTable for reports a "report_ALARM_DEVICES_REG" id area (while the outside has "ALARM_DEVICES_REG") so I used to be more selective.

    replaceHtmlEntites is a function which should bring the special character of "& x; ' values and it is the following (I put it in"Function and Variable overall statement"field of the APEX of the State page):

    var replaceHtmlEntites =)
    function() {}
    var translate_re = "/ & (nbsp |)» amp | quot | Lt | GT); / g » ;
    definition of var = {}
    "nbsp": "",
    'amp': '& ',.
    "quot ': ' \ ',"
    "lt": ".."
    'gt': ' > '.
    };
    function (s) {}
    Return (SS. Replace (translate_re, {function (match, entity)
    back translation [entity];
    }) );
    }
    })();


    Shouldn't this work? And if not, why?
    Thanks to you all!

    You should be able to edit the column in the developer and scroll up to 'Column link' and use it. Tried not to who? Or he does not satisfy your needs?

  • JavaScript in JSPX and run after the page loads?

    I want to insert some JavaScript to my file jspx, but his does not work... I did this way:
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
              xmlns:trh="http://myfaces.apache.org/trinidad/html">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view locale="#{actionAvailable.userLocale}">
        <af:document id="d1" title="#{bindings.title.inputValue}">    
          <f:loadBundle basename="oracle.bpel.services.workflow.worklist.resources.worklist"
                        var="resources"/>
          <trh:script source="/jsLibs/taskDetails.js" id="s1"></trh:script>
    
        <!-- //I ADDED THIS -->
        <f:facet name="metaContainer">
            <af:group>
                <trh:script>
                   function myFunction()
                   {
                    alert("function called");
                   }
                </trh:script>
            </af:group>
        </f:facet>
        <!-- //END OF SCRIPT -->
    
    
        <!-- //I WANT TO RUN MY FUNCTION AFTER PAGE IS LOADED -->
          <BODY onload="myFunction();">
          <af:form id="f1" usesUpload="true">
            <af:panelGroupLayout layout="vertical" inlineStyle="padding:5px;"
                                 id="pgl5">
              <af:panelLabelAndMessage id="id12" label="">
                <af:goLink text="Click here" id="link"
                           destination="#{LinkCreator.link}#{bindings.taskNumber.inputValue}"
                           targetFrame="_self"/>
              </af:panelLabelAndMessage>
            </af:panelGroupLayout>
          </af:form>
          </BODY>
    
    
    
        </af:document>
      </f:view>
    </jsp:root>
    As you can see, I just very simple jspx file and all I want to do is to run myFunction() after loading the page.
    So I inserted a very simple script with 1 function that handles the simple alert (I followed this instructions http://adfcodebits.blogspot.com/2010/03/bit-3-adding-javascript-to-jspx-page.html).
    I also added BODY onLoad, but nothing happens...

    What's wrong?

    Published by: user1175491 on November 11, 2010 11:55

    Try this:



    function someFunction() {}
    Alert ("OnLoad");
    }


    you don't have to use the body tag

    Published by: Nikhil Gokhale on November 11, 2010 19:18

  • Insert some JavaScript inside a JSPX (JD11.1.1.3.0)

    Hi all
    I am trying to add some javascript on my pages. In particular, I would like to add the javascript popbox to zoom images.

    So I found this page: http://adfcodebits.blogspot.com/2010/03/bit-3-adding-javascript-to-jspx-page.html

    She seems perfet for me. I've added:

    < f: facet name = "metaContainer" >
    < af:group >
    "< afh:script source="scripts/PopBox/scripts/PopBox.js "type =" text/javascript"/ >
    < / af:group >
    < / f: facet >

    the PopBox in slot: public_html/scripts/PopBox/scripts/PopBox.js

    If I sow the generated html code, I saw:

    < head >
    "< link href="/EdvaraTEST-ViewController-context-root/adf/styles/cache/fusion-desktop-ua1gw8-ltr-gecko-1.9.2.3-cmp.css "type =" text/css"charset =" UTF - 8 "rel ="stylesheet">".
    < script...
    .....
    "< afh:script type =" text/javascript"source="scripts/PopBox/scripts/PopBox.js "> < / afh:script >
    < / head >

    So it seems that the system recognizes the < afh:script

    I have tryied with < afh:script rather < script but javascript doesn't work...
    Any suggest?

    So should I use another library?

    Thank you
    Cristian

    Have you tried using af:resource?

    SID

Maybe you are looking for