#JavaScript

0 Followers · 129 Posts

JavaScript, often abbreviated as JS, is a high-level, interpreted programming language. It is a language which is also characterized as dynamic, weakly typed, prototype-based and multi-paradigm.

Learn more.

Announcement Nikita Savchenko · Jan 19, 2017

Greetings, InterSystems community!

I am pleased to announce that the web terminal project, Caché WebTerminal version 4 gets its release! After long period of enhancing this web application from 2013, it came to the version 4, which features major stability and security improvements, intelligent autocomplete and syntax highlighting, convenient SQL mode and a lot of other useful features.

The goal of this article is to spread the knowledge about this project over the InterSystems community.

34
3 3733
Question Andy Coutinho · Feb 25, 2021

Does anyone know how to get the closing tab/menu changing event in a CSP? I've tried the JS "OnBeforeUnload" already but it seems the browsers aren't allowing it anymore. I need to show a pop-up that holds the user if trying to get away before completing the stage.

1
0 154
Article Ward De Backer · Apr 20, 2017 5m read

Developing a Full-Stack JavaScript web app with Caché requires you to bring together the right building blocks. Previously, I outlined the basic steps to install and connect Node.js to Caché and make it's powerful multi-model database capabilites available for use with Node.js. You can use Caché as a NoSQL-, document- (with unique key-level access!), SQL- and object-database with Node.js. When developing JavaScript applications, you'll see how powerful this combination is and makes Caché a perfect fit for Node.js.

8
2 5086
Article Rob Tweed · Oct 6, 2020 4m read

Those of you who are following the FullStack competition here in the Developer Community will know that I submitted an entry named qewd-conduit.  I wanted to summarise why I think it's something worth you taking a bit of time to check out.

qewd-conduit uses the Node.js-based QEWD framework alongside IRIS to implement the back-end REST APIs for something known as the RealWorld Conduit application:

https://github.com/gothinkster/realworld

6
1 627
Article Henrique Dias · Oct 6, 2020 2m read

What is npm-iris? 

N.P.M stands for "No Project Mess."

N.P.M. is a Project & Task Management app that uses InterSystems IRIS and Bootstrap 4.

No Project Mess is created to help developers and small business companies to reduce complexity in their daily problems, with a simple and intuitive projects and tasks management software. 

It offers different views for your tasks, from a spreadsheet, kanban, calendar, or even Gantt!

0
0 411
Article Chris Stewart · Apr 17, 2017 4m read

So, one day you're working away at WidgetsDirect, the leading supplier of widget and widget accessories, when your boss asks you to develop the new customer facing portal to allow the client base to access the next generation of Widgets..... and he wants you to use Angular 1.x to read into the department's Caché server.   

There's only one problem:  You've never used Angular, and don't know how to make it talk to Caché.

This guide is going to walk through the process of setting up a full Angular stack which communicates with a Caché backend using JSON over REST.  

Part 1 - Setup

23
3 5069
Article Renato Banzai · Aug 27, 2020 2m read

Whats NLP Stands For?

NLP stands for Natural Language Processing which is a field of Artificial Intelligence with a lot of complexity and techniques to in short words "understand what are you talking about".

And FHIR is...???

FHIR stands for Fast Healthcare Interoperability Resources and is a standard to data structures for healthcare. There are some good articles here explainig better how FHIR interact with Intersystems IRIS.

My Solution

Chatbot to query FHIR

2
0 828
Question Arnold Cota · May 26, 2020

I am trying to set a varaible/property within JavaScript and use the value in my method.  The alert method below returns "0".  Do I have the syntax wrong?

/// Storage for current table row

Property currentTableRow As %ZEN.Datatype.string [ InitialExpression = 0 ];

set ..currentTableRow = "1"

&js<

    alert(zenPage.currentTableRow);
>

8
0 460
Article Bernd Mueller · Jan 30, 2018 13m read

Some time ago I got a WRC case transferred where a customer asks for the availability of a raw DEFLATE compression/decompression function built-in Caché.

When we talk about DEFLATE we need to talk about Zlib as well, since Zlib is the de-facto standard free compression/decompression library developed in the mid-90s.

Zlib works on particular DEFLATE compression/decompression algorithm and the idea of encapsulation within a wrapper (gzip, zlib, etc.).
https://en.wikipedia.org/wiki/Zlib

6
2 2766
Announcement Rob Tweed · May 15, 2020

I've created a new repository that I will use for providing examples of various scenarios and use cases for QEWD

https://github.com/robtweed/qewd-microservices-examples

Initially it contains a example of a scenario I'm often asked about: a set of REST APIs, with JWT support, implemented as a set of QEWD MicroServices, each of which uses Cache or IRIS running on a Windows system.

What I've provided is a detailed, step-by-step guide (with detailed explanations) of how to set up such a system.

The example shows a use case of REST APIs to:

- authenticate / login

0
1 477
Article Ward De Backer · Apr 20, 2017 5m read

Full-Stack JavaScript development allows you to create state-of-the-art applications with Caché. With any (web) app you build nowadays, one has to make a lot of architectural decisions and you want to make the right ones. With the Node.js connector available for Caché, you can create a very powerful server side application server, allowing you to use the latest JavaScript technology and frameworks client- and server-side.

13
1 3270
Question Jenna Makin · Mar 26, 2020

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 

5
0 2861
Question Đặng Phú Lộc · Mar 19, 2020

Hi everyone,

I have a javascript function in *.js file. This function has to access to variable set by server.

I've tried setting the variable in *.js like this;

function dummy(){

var myText = '#(myText)#';

}

However it seems like the webserver doesn't understand this coding convention. The js file sent back to client set myText in dummy() with the hard-value #(myText)#. It's not the value of myText variable in server side.

I know I can achieve this by putting dummy() directly in csp file. However I have to put dummy() in separated file, so that other files can use it.

3
0 690
Announcement Rob Tweed · Dec 7, 2019

Hot on the heels of the QEWD-JSdb announcement, QEWD-baseline provides a ready-to-run baseline environment for developing REST APIs.

The QEWD-baseline repository (https://github.com/robtweed/qewd-baseline) includes a fully-detailed tutorial on how to build RESY APIs using QEWD and the QEWD-JSdb database (running of course on IRIS).

https://github.com/robtweed/qewd-baseline/blob/master/REST.md

Included in the tutorial is:

- fully-worked examples, including how to integrate QEWD-JSdb's abstraction of the IRIS database 

- advice on debugging QEWD REST APIs

1
0 305
Question Laura Cavanaugh · Nov 26, 2019

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.

1
0 404
Article David Crawford · Jul 31, 2019 2m read

IRIS provides us with anti login CSRF attack mitigation, however this is not the same as a CSRF attack, as login attacks only occur on the login form. There are currently no built-in tools to mitigate CSRF attacks on api calls and other forms, so this is a step in mitigating these attacks.

See the following link from OWASP for the definition of a CSRF attack:

https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)

5
1 779
Question Thembelani Mlalazi · Apr 11, 2019

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

2
0 490
Article Nikita Savchenko · Feb 12, 2019 13m read

ˮ This is one of my articles which was never published in English. Let's fix it!

Hello! This article is about quite a practical way of developing InterSystems solutions without using the integrated tools like Studio or Atelier. All the code of the project can be stored in the form of "traditional" source code files, edited in your favorite development environment (for example, Visual Studio Code), indexed by any version control system and arbitrarily combined with many external tools for code analysis, preprocessing, packaging and so on.

6
6 3187
Article John Kumpf · Jan 14, 2019 2m read

This is a quick note on what happens when, on your CSP page, you call a cache script which returns a %Boolean and store that value in a javascript variable.

When you call a script with language="cache" and returntype="%Boolean" from a javascript script, the return value is interpreted as a string, not as a boolean.

Here's an example:

A cache script that returns (in theory) a "false" value:

<script language="cache" method="giveMeAFalse" arguments="" returntype="%Boolean" procedureblock='1'>
return 0
</script>

A javascript method that logs what the value's actually interpreted as:

3
0 608
Question Scott Roth · Dec 21, 2018

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

9
1 1641