- This topic has 5 replies, 2 voices, and was last updated 10 years, 10 months ago by amckinlay.
July 14, 2012 at 7:50 pm #731
Are you using the suneido:// protocol or running through HttpServer ?
I think you would make an AJAX call. If you are using HttpServer and may have different browsers then you might want to use something like jQuery.ajax
If you are using suneido:// then you can do something like suneido://eval?MyFunc()
If you’re using HttpServer then you would add your function to HttpMap
Your function can then do a query and return the results as JSON or XML.
Is that what you are looking for, or am I misunderstanding?July 14, 2012 at 9:31 pm #926
I am using the suneido://eval? protocol, but I can’t get it to assign the result to a variable. The only reference in the documentation I see is an example which shows:
This works for calling functions that do not return any result. But when it returns a result, I can’t assign it to a variable. I tried:
but it fails, and when I use:
You need to make an AJAX call. There is lots of help on this on the web.
For multiple connections, it is better to use HttpServer and http:// links instead of the suneido:// protocol. And if you want to handle a lot of connections then jSuneido (the Java version) is better because it is multi-threaded and will take advantage of multiple cores and more memory with 64 bit.
- You must be logged in to reply to this topic.