You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not an issue I don't think, but I am having issues when referencing ect outputs inside JS code.
How would I fetch an entire object and assign it to a JavaScript variable?
var client = "<%= @objects.client %>"; results in client being equal to "[object Object]" instead of:
{ id: 1, name: "Ross" }
How would I initialize a JavaScript variable to an ect value which is an integer?
var clientId = "<%= @objects.client.id %>"; results in clientId being either '1' or '' when it's not set, instead of 1 or null.
Removing the ""s surrounding the ect code results in the JavaScript not compiling and therefore not running properly.
Many thanks,
Ross.
The text was updated successfully, but these errors were encountered:
Not an issue I don't think, but I am having issues when referencing ect outputs inside JS code.
How would I fetch an entire object and assign it to a JavaScript variable?
var client = "<%= @objects.client %>"; results in client being equal to "[object Object]" instead of:
{ id: 1, name: "Ross" }
How would I initialize a JavaScript variable to an ect value which is an integer?
var clientId = "<%= @objects.client.id %>"; results in clientId being either '1' or '' when it's not set, instead of 1 or null.
Removing the ""s surrounding the ect code results in the JavaScript not compiling and therefore not running properly.
Many thanks,
Ross.
The text was updated successfully, but these errors were encountered: