-
October 14th, 2009, 08:11 PM
#1
how to send a LS server message to a javascript function like a json parameter
hi all,
now i'm working with javascript code, i reed the Web Client Dev and i see the jsdoc.
i can't find a way to send the message from my javaadapter to a javascript function.
i created my java adapter, this create a String with a json, something like this
String sMessage = "{field1:'value1',field2:'value2',....}";
how can i do to pass this String to a javascript function?? and then, how can i run this javascript function with this parameter?? depending of the values i have to hide or show some areas of my web site.
thanks for your help.
-
October 14th, 2009, 11:28 PM
#2
well, i try to create a NonVisualTable with a group and schema and the subscription mode is COMMAND, when i try to run this an alert show me with this message
1: 18:18:46,590 ER addTable Key position is not set correctly for a COMMAND mode subscription. Please specify a field that represents the Key
when i change the mode to MERGE this work fine.
i'm not sure about the subscription mode operation, i read the document General Concepts, and not finish to understand, can you explain me??
about the obtain the message with a java script function, it's done
the problem is how to conver my string to json.
is there a way to pass a json parameter instead a string??
regards
-
October 15th, 2009, 10:21 AM
#3
Unfortunately, no facility is provided for manipulating json data on the client side;
the update event handler of your NonVisualTable should use the received string and directly use eval or any more sophisticated technique available.
About subscription modes, they allow for managing a sequence of updates in different ways.
The name of COMMAND mode may be misleading;
anyway, it is not aimed at pushing javascript code, but rather at pushing list contents and their changes (through list manipulation "commands").
At this stage, you can concentrate on MERGE mode and ignore other subscription modes.
-
October 15th, 2009, 01:43 PM
#4
thanks for your help, i work with MERGE mode.
i try to work with a string, the problem is i need to pass a lot of data and analyze this information and analyze this information. i see the way to do this.
regards.
-
October 16th, 2009, 11:58 PM
#5
hi again,
i have a new and strange error
well, I managed to create an application in the following path
www.mydomain.com/myapp/lsAlarms.php --> master push-page
everything works in this environment
i try to change this index.php to
eco.mydomain.com/myapp/lsAlarms.php
when i try to run this second a javascript alert show me this message
1: 18:38:21,223 ER bind Unable to find the Engine. Retrying. If the problem persists, please check your configuration.
i don't now why this happends :S the code is the same. i only change www.mydomain.com to eco.mydomain.com
do you have any idea why this happends??
-
October 19th, 2009, 10:30 AM
#6
Please paste here the code you use to configure your PushPage instance.
Similar Threads
-
By naitsir in forum Client SDKs
Replies: 7
Last Post: October 2nd, 2012, 10:36 AM
-
By hungtt in forum Adapter SDKs
Replies: 7
Last Post: December 30th, 2010, 03:42 AM
-
By latha in forum Client SDKs
Replies: 6
Last Post: December 7th, 2010, 09:26 AM
-
By latha in forum Client SDKs
Replies: 1
Last Post: January 18th, 2010, 03:27 PM
-
By kanibal210 in forum Client SDKs
Replies: 1
Last Post: September 30th, 2009, 08:36 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 03:59 PM.
Bookmarks