Javascript, Passing it Omnis variables

Das Goravani goravanis at
Sun Nov 20 19:34:36 UTC 2022

Nobody is answering my Javascript related queries here. Darn it.

Well here’s a refinement of what I’ve been asking.

If I say in JS:

Let myVar = document.cookie

And myVar is a defined local variable in Omnis, I get the value of document.cookie in my local variable. 

So if using "let" then there is some sort of passing of data from Javascript to Omnis

But in the case of trying to write the cookie, 


Where myVar is a declared local var variable that has been previously assigned with a value, a string. 

If I put in the string directly onto the command, it saves the cookie. 

If I use a variable as shown above, it does not save the cookie.

In this case there doesn’t seem to be passing of data between the Omnis Javascript and my one line of Javascript.

Is there something I need to do to enable Omnis assigned string variables declared in Omnis to be used in the Javascript? 

Again the "let" command worked but this later one the variable is on the other side of the equation or it’s not being declared. 

I’m wondering if we need to declare them in Javascript first, then assign their values some way, 

I’m just trying to move a string from Omnis to Javascript usage.. why does let pass to me but I cannot pass to a var in JS?

More information about the omnisdev-en mailing list