How can I pass 2 values to a javascript function after a database query?
I need to find the difference between the two returned timestamps and then put the result in a page element.
How can I pass 2 values to a javascript function after a database query?
I need to find the difference between the two returned timestamps and then put the result in a page element.
Save the values you get from database into local storage
Write the script that you need, inside the script, read the values from local storage.
If you need to pass the values, then just define a JavaScript function:
foo (val1, val2) {...}
How can I know what order values are saved and scripts are run? Does it simply go vertically down the list as shown in the Data window?
The Data view lists data sources (services) added to the page. The order is defined in Design Events tab. Keep in mind that JavaScript is asynchronous. The order in which services (or JavaScript) will finish is not necessarily the order in which they are listed.
Ok, thanks