#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.

Question Brian Schoen · Jan 12, 2024

I am trying to pull out something similar to an HL7 date/time stamp in a custom zen page , in a javascript code section.

var d new Date();

(Fri Jan 12 2024 16:58:30 GMT-0500 (Eastern Standard Time)

but,
var year = d.getFullYear();

<Error>

d.<formatcmd>  doesn't seem to work.  (d.getmonth, etc.)

Is there and date formatting I can use inside a javascript routine?

3
0 224
Discussion Stefan Cronje · Dec 15, 2023

Hi all,

The last time I used CSP was back in 2008, so I am very rusty on it.
This question might have been asked many times, and the answer probably is that it is a matter of preference.

Are there scenarios to which CSP pages is easier/better to use than classes extending from %CSP.Page?
I want to build a little thing and don't want to start at the wrong end.
Doing an API-based, heavy client-side framework is not a requirement, and I would prefer not to do it that way.

Some of the criteria

4
0 332
Question Mark Scicluna · Jan 3, 2024

I wish to retrieve data from a cache table and then chart the results using javascript/chart.js.  I have had numerous iterations of the code attempting to do this (none of which worked) and my latest iteration is shown below.  

<html>
<head>
   <title>Cache Server Page</title>


   <!-- Include the Chart.js library -->
   <script src="chart.umd.min.js"></script>
   
<csp:SQLQUERY NAME='resultSet' P1='A'>
select Value, StatsDate from Stats 
</csp:SQLQUERY>


<script LANGUAGE="JavaScript">
// Initialize arrays to store data
var xValues [];
var yValues [];
</script>

<csp:WHILE CONDITION="resultSet.Next()">     

8
0 315
Question Rob Ellis · Dec 27, 2023

Is it possible to get a code quality stamp of approval on the Open Exchange with an application written in Javascript?
My Iris Whiz application is a browser extension written in Javascript and I wonder if having the code quality stamp missing from my application page will put people off from using it.
 

2
0 190
Question Stephane Devin · Dec 14, 2023

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?

8
0 473
Article Ward De Backer · Apr 22, 2017 14m read

Developing a Full-Stack JavaScript web app with Caché requires you to bring together the right building blocks. In the previous part, we created a basic front-end React application. In the second part of this article series I will show how to choose the right back-end technology for your application. You will see Caché allows you to use many different approaches to link your front-end to your Caché server, depending on your application's needs. In this part we will set up a back-end with Node.js/QEWD and CSP/REST. In the next part we will enhance our basic web app and connect it to Caché using

12
1 3340
Question Benying Zou · Aug 31, 2023

I have created 3 pages, the scripts are there:

Class BZ.Test1 Extends%ZEN.Component.page
{
    ClientMethod onloadHandler() [ Language = javascript ]
    {
        console.log("Test1");
    }
}

Class BZ.Test2 Extends BZ.Test1
{
    ClientMethod onloadHandler() [ Language = javascript ]
    {
        this.invokeSuper('onloadHandler',arguments);
        console.log("Test2");
    }
}

Class BZ.Test3 Extends BZ.Test2
{
    ClientMethod onloadHandler() [ Language = javascript ]
    {
        this.invokeSuper('onloadHandler',arguments);
        console.log("Test3");
    }
}
2
0 320
Article Sowmiya Nagarajan · Jul 5, 2023 7m read

Previous postUsing AI to Simplify Clinical Documents Storage, Retrieval and Search

This post explores the potential of OpenAI's advanced language models to revolutionize healthcare through AI-powered transcription and summarization. We will delve into the process of leveraging OpenAI's cutting-edge APIs to convert audio recordings into written transcripts and employ natural language processing algorithms to extract crucial insights for generating concise summaries.

2
2 1642
Article Ikram Shah · Jul 6, 2023 6m read

Idea sourced from InterSystems Ideas Portal

Previous Posts:

Using AI to Simplify Clinical Documents Storage, Retrieval, and Search

Doctor-Patient Conversations: AI-Powered Transcription and Summarization

Introduction

The healthcare industry is continuously evolving, and the need for efficient document management and patient data management is more critical than ever. In this article, we will focus on the specific aspects of integrating Google Docs and Google Sheets with FHIR data in the context of healthcare data interoperability.

Google Docs Integration for Clinical Documents

0
1 206
Question Erum Ahsan · Jun 6, 2023

I have the following method call (have included html and css as well). when I debug the code in a browser, JavaScript seems to work fine. Loading image is coming up, table is getting hidden. But when I close the debug and just load the page and run it, loading image is not coming up, neither the table is hidden. Not sure what is going on? I need help to understand what I am doing wrong?

XData Style

{

<style type="text/css">

#loading {width: 100%;height: 100%;top: 0px;left: 0px;position: fixed;display: block; z-index: 99}

#loading-image {position: absolute;top: 40%;left: 45%;z-index: 100}

</style>

}

3
0 187
Question Nezla · Jun 6, 2023

Hi Guys, I'm resending this because I sent on the weekend and looks like it has not been noticed much 

I'm not that familiar in using Javascript in Zen pages, so basically we have a priting utility (app) that requires us to add a bit of JavaScript call to facilitate printing from our Zen pages as below:

So I added XData link pasted the required script, is this the correct way?

2
0 297
Article Muhammad Waseem · Feb 10, 2023 5m read

Hi Community,

This article is a continuation of my article about  Getting to know Python Flask Web Framework   

In this article, we will cover the basics of topics listed below:

1. Routing in Flask Framework
2. Folder structure for a Flask app (Static and Template)
3. Getting and displaying data in the Flask application from IRIS.

So, let's begin.

0
0 1745
Article Muhammad Waseem · Feb 9, 2023 2m read

Hi Community,
In this article I will demonstrate below steps to add Interactive map and visualize geographic data to web application:

  • Step1 : Install Application
  • Step2 : Create CSP Page
  • Step3 : Extend dc.IrisGeoMap.Folium class
  • Step4 : Invoke DrawGeoDetails() Method

So Let us start.
 

Step1 : Install Application

First of all we need to install iris-geo-map application by using ZPM

zpm "install iris-geo-map"
0
1 346
Job Spencer Frey · Aug 31, 2022

Hi everyone!

I am recruiting on a fully remote Intersystems Developer.  This role will be a long term contract to begin with high likelihood of extensions or conversion permanent.  Please check out the job description down below and feel free to send me an email with your resume: Spencer.Frey@insightglobal.com 

1
0 375
Question Alex Kogan · Apr 5, 2022

I have a few Radio buttons, some of which have to have the same value.  I need to know which one the user have selected, so I am using text, however it does not work well so far.

Example: 
I have 4 Radio buttons: Apple, Pear, Lemon and Orange, with values: Apple, Pear have Value 1, and Lemon and Orange have Value of 2
(this unfortunatelly cannot be changed for this particular application)

I need to figure out that the user picked specifically Apple, so I am using text as follows:

5
0 185
Question Manikandasubramani S · Jan 26, 2019

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

1
1 1955
Article Muhammad Waseem · Feb 24, 2022 2m read

Hi, Community,

This post will demonstrate how to display data on the web by using Embedded Python , Python Flask Web Framework and Jquery datatable
image

We will display processes from %SYS.ProcessQuery table.

Step 1: Add table to HTML page and write below javascript code to display passed data from app.py :

HTML

  <table id="myTable" class="table table-bordered table-striped">                 
   </table>

Javascript

0
0 1955
Article Alex Kogan · Jan 22, 2021 2m read

This concept may be known to some, but I just found it very useful and I would like to share as it may help someone else.

If you are working with CSP or Zen you sometimes come across the need to use embedded JavaScript. Suppose you are working with some loops, which use < or > as shown in example below:

&js< 

               var test = document.getElementById('seTest');

               for (var i = 0; i < test.options.length; i++) {

                              // Do Something here with my test.options[i]...

               }             

>

2
5 554
Article Chris Stewart · Apr 18, 2017 3m read

or "So you just got yelled at by your boss, for sending him an unformatted Hello World webpage"

Our previous lesson ended with us serving a Message value obtained from a Caché REST service to the client, using Angular as a runtime.  While there is a lot of moving parts involved in this process, the page is not especially exciting at the moment.  Before we can start adding new features, we should take a step back and review our tools.

1
1 2650
Article Ward De Backer · Oct 28, 2021 2m read

I wrote a step by step tutorial in the qewd-howtos repository how you can write state of the art multi-page web apps with Node.js using a QEWD-Up WebSocket/REST api back-end integrated with a mainstream web framework like NuxtJS & Vue.js. In particular with the latest NuxtJS/Vue.js frameworks, writing web applications becomes fun again, allowing you to write your applications very efficiently, hiding all boilerplate code from you.

The tutorial should be very easy to try out on your development machine and consists of two parts:

0
3 1201
Question Amit Prajapati · Aug 23, 2019

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.

Please note that I have tried all option which are mentioned on following URL:

5
0 16271
Question Syed M · Jul 27, 2021

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
}

This is the code we implemented. But the problem is getSessionValues() method isn't called.
We need to know how to call a class method from client method.

Thanks,
Syed M

1
0 508