JavaScript

Syndicate content 15 

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:

+ 1   0 1
0

comments

39

views

+ 1

rating

Good day,

We upload images into the database with this code :

<tr>
<td align="right">FileName</td>
<td><input type=file size=200 name=FileStream></td>
</tr>

s FullFilename = %request.Get("FileName")
s FileName = ##class(%File).GetFilename(FullFilename)
s ItemImage.FileName = FileName

+ 1   0 3
0

comments

73

views

+ 1

rating

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   0 1
0

comments

60

views

0

rating

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.

Last answer 23 August 2019 Last comment 23 August 2019
0   0 2
733

views

0

rating

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)

Last comment 7 August 2019
+ 4   1 2
160

views

+ 4

rating

Another feather in Mobio Solution's continuous growth. Our Dedicated React Js Developers have delivered mission critical next-generation super fast web system using Gatsby.js. Scale your website to millions of users with Gatsby. For more information please visit our blog:  https://mobiosolutions.com/what-is-gatsby/

 

0   0 1
0

comments

12

views

0

rating

Please Help.

When I busy capturing the information into the database and when you press insert button then following error  pops up.

Local host:57772 says  A JavaScript exception was caught during execution of Hyper Event: Type Error: Cannot set property 'value' of  undefined .

This error is produced by cache technology. Your assistance in this regard is highly appreciated.

Regards

Godfrey Marobela

0   0 3
146

views

0

rating

Intro

Most server-client communication on the web is based on a request and response structure. The client sends a request to the server and the server responds to this request. The WebSocket protocol provides a two-way channel of communication between a server and client, allowing servers to send messages to clients without first receiving a request. For more information on the WebSocket protocol and its implementation in InterSystems IRIS, see the links below.

Last comment 26 April 2019
+ 5   3 4
890

views

+ 5

rating

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.  

Last comment 25 April 2019
+ 14   1 7
2867

views

+ 14

rating

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

 

Last answer 11 April 2019 Last comment 12 April 2019
0   0 2
101

views

0

rating

Hello folks,

I have an JSON object that need to be updated before being parsed into a JSX component.

Source JSON obj:

var Obj = { "data": [
  {"id":1, "text":"Task #1", "project":"10", "sub_project":"10-1" },
  {"id":2, "text":"Task #2", "project":"10", "sub_project":"10-1" },
  {"id":3, "text":"Task #3", "project":"11", "sub_project":"11-1" },
]};

 

Required JSON obj result:

Last answer 7 March 2019
0   0 2
0

comments

124

views

0

rating

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.

Last comment 26 February 2019
+ 15   2 8
2062

views

+ 15

rating

WebSockets as a communication technology wins increasing importance.
In the SAMPLES namespace, you find a nice example for running a WebSocket Server.
There is also a useful example for a Browser Client. But it is still in the browser. 

My point is:
How to consume the output of a WebSocket Server in your application?

+ 6   0 0
0

comments

177

views

+ 6

rating

WebSockets as a communication technology wins increasing importance.
In the SAMPLES namespace, you find a nice example for running a WebSocket Server.
There is also a useful example for a Browser Client. JavaScript does most of the work. 

My point is:
How to consume the output of a WebSocket Server in your application?

+ 8   0 0
0

comments

216

views

+ 8

rating

Hi,

I'm in the process of trying to convert my team to a Git-based workflow for source code version management (we use Ensemble and HealthShare, but build a lot of customizations on top). We are having a hard time working with Atelier in this regard for a few reasons:

Last answer 3 May 2016 Last comment 29 January 2019
+ 2   0 1
1094

views

+ 2

rating

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
0

answers

0

comments

552

views

0

rating

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:

Last comment 16 January 2019
0   0 1
243

views

0

rating

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

Last answer 22 December 2018 Last comment 4 January 2019
+ 2   1 3
623

views

+ 2

rating

There's a new and exciting enhancement to QEWD that has just been released - it's an additional layer of abstraction known as QEWD-Up.  QEWD-Up hides away all the mechanics of QEWD itself, allowing you to focus on just your REST APIs and the code that implements them.

Additionally, and importantly, QEWD-Up simplifies the maintenance of your REST APIs, allowing you (and others) to quickly and easily understand their life-cycle and implementation.

Last comment 2 January 2019
+ 3   4 3
492

views

+ 3

rating

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 these technologies.

Last comment 14 December 2018
+ 5   0 4
2199

views

+ 5

rating

As a result of Evgeny's recent questions regarding the use of QEWD.js with IRIS in another post, I thought it would be a good idea to create a separate post focusing specifically on how to use QEWD.js to create REST APIs for IRIS.

QEWD.js is,  of course, a Node.js framework, and all the REST API code can be written entirely in JavaScript. 

Last comment 13 December 2018
+ 4   4 3
496

views

+ 4

rating

Users of analytical applications often need to generate and send out PDF reports comprised of elements of the analytical panel. In the InterSystems stack, this task is solved using the DSW Reports project that is an extension of DeepSeeWeb. In this article, we will explain how to use DSW Reports for generating PDF reports and emailing them.

+ 1   1 3
0

comments

217

views

+ 1

rating