Hi All,

I have created a REST class in which have the Parameter HandleCorsRequest = 1;

I can able to access the API using Postman, but not with my web application. It throws the below error.

Access to XMLHttpRequest at 'http://localhost:52773/IrisVSCode/app/test' from origin 'null' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

0 5
0 15.6K

I cannot connect to Cache from node.js

I have installed in Windows 10 the following: CACHE 2016, node.js v 4.4.7 and express .

- where can I get cache.node? The link in the Intersystmes documentation http://globalsdb.org/downloads/ doesn't work. I found cache0100.node and cache0120.node in my Cache instance's \bin directory. But I am not sure if I can use them or not.

- how to install cache.node ? Where do I place it exactly?

Can anyone recommend any tutorial or code example with installation instructions?

1 12
1 3.4K

Hi-

I am trying to create a simple example of allowing binary (tiff) files to be selected and uploaded asynchronously to an IRIS for Health back-end. I have managed to write the HTML and Javascript which works great with regular text / ascii files, but fails with binary files.

When I upload a binary file (tiff) image I get garbage like this on the database server

1 5
0 2.5K

Hi,

I have been trying to implement SPA using routing between two components in a CSP page.

If i use the line which i commented the page views and gets data from the vue instance (when not using the <route-view> and other 2 vue route functions below).

since i need to implement routing i am using as below, now the property "selectedYear" is not getting data from vue instane and i am getting the below error as well.

I dont know whether i am going down the right path.

please see my code below and help me

0 1
1 1.8K

Has anyone called any outside Javascript code from inside their class files? I asked a long time ago if there was a way to manipulate an image within Cache Object Script, and since Cache doesn't have any image libraries its not really possible. However I have found Javascript to resize an image and wonder how hard it would be to mesh the two together.

Can anyone share any examples?

Thanks

Scott

2 9
1 1.4K

Hoping someone can help.

I had posted a similar question outside this group a while ago "Errors requesting data from local Ensemble FHIR Repository" but haven't had the chance to follow up on it since. It was suggested I re-post inside this group.

I'm trying to request data from my local FHIR repository using a simple JavaScript client and am getting the following CORS errors . ( It is a standalone client not inside HealthShare without CSP etc. on my localhost ).

0 4
0 1K

Hi,

If I test the Native api for Node.js from the documentation, I noticed (if I'm correct) all methods and calls are synchronous. By default due to the nature of Node.js, there is only one thread of execution and normally all JavaScript methods and all calls should be asynchronous and use either a callback function (the "old way") or promises or the async/await contruct to return their result, e.g.:

0 13
0 458
Question
· Jul 27, 2021
Method Call

Hi all,
We have a session values in a cache method and need to get those values in a client method (JavaScript).

Eg :
ClassMethod Method1()
{
Set %session.Data("Param1")="Data 1"
}

ClientMethod onloadHandler [Language = javascript]
{
var ret = zenPage.getSessionValues();
}

ClassMethod getSessionValues() As %String [zenMethod]
{
Set Data = $G(%session.Data("Param1"))
Quit Data
}

0 1
0 394

I have a query that I would like to have refreshing at certain intervals lets say every 30 seconds with out refreshing the page content using the META TAGS

refreshes the whole page but I have a jquery function that will run at those intervals that I can use the problem is getting the jquery to call my COS function or is the way to do it with pure COS

0 2
0 366

Hi everyone, I have and Zen Mojo application, it's all working but I have some doubts about what is recommended to use: There is some reports of employees, for example, and actually I'm using some plugins : "Excelent export" to generate Excel reports and "jspdf" to generate PDF reports in client side.

I have an REST service, that receives the request, process and returns JSON, after client side receive the response it's processed.

- This can be slow/bad in applications with large data?

- It's better/recommended to use ZenReports even with ZenMojo applications?

1 2
0 359

Hello,every body.

I am having a problem when using atelier. I found that the web front-end related files (such as csp, css, js, etc.) will change in format when they are synced to the server.

For example:

The original format of the js file may be UTF-8. However, when I edited and saved in atelier, the file version format on the server became ANSI. I tried to configure the environment in eclipse, but it doesn't seem to work.

E.g:

1 8
2 337

Hello community,

I recently added a change to our copy of zenutils.js, and while moving it up to production, I found different versions of zenutils.js. I edited a copy stored in the default directory for our web application (e.g. c:\intersystems\DEV\CSP\{application}) but the file on production is stored in {install dir}\CSP\broker.

0 1
0 301

I got a problem to resolve, to sum it up I need to extract a function body from a JS file with cos.
I already got the JS code in a string and the function name but I'm kinda stuck as to how to get my function body, I already tried a few things (regEx, counter bracket) but there are comment and strings that block them from functioning. Is there a javascript parser or a good way to do it except by creating a javascript parser?

0 8
0 242