I am using JSON to pass the grid data from JHS to Javascript. The verb griddatfrtd reads TAB delimited CSV style text and builds a JSON string for DHTMLX.
What I am wondering is how to do the reverse. I can build the JSON on the JavaScript side but how do you post this back to JHS. jdoajax pulls data out of the page; can it handle data that is built on the fly and is not necessarily in the page. ev_gridme_click=: 3 : 0 try. NB. smoutput seebox NV 'tin tout'=. getvs 'tin tout' 'ROWID gstr'=. ROWID griddatfrtd tin jhrajax gstr catch. jhrajax griddaterr 'error loading grid' end. ) On Mon, Dec 3, 2012 at 9:54 AM, Eric Iverson <[email protected]>wrote: > You probably want to look at JSON. This is a serialization of any JS > object. Javascript has built in methods to serialize an object and to > create an object. The encoding is pretty straight forward and it is > easy to write equivalents in J. Note that for data there is direct > correspondence between a J boxed array and a JS nested array. You can > then exchange JSON formatted data with ajax between J and JS. > > There is lots of web info on JSON. > > JD (new JDB) uses JSON to exchange database tables with clients. Many > clients (C, C++, C#, etc) have similar methods for JSON data exchange. > > On Mon, Dec 3, 2012 at 10:39 AM, John Baker <[email protected]> wrote: > > This question is mostly for Eric but I'm sure his answer will be of > > interest to a larger audience. > > > > I am putting the finishing touches on a JHS/JavaScript grid demo using > the > > DHTMLX grid. > > The freebie version I am using does not support grid serialization - you > > have to pay for > > that! So to save my grid changes I have to roll my own mini-serializer. A > > brain dead > > scan of the rows suffices to collect the data but then I have to send it > > back to JHS in > > some string form and I don't see how to do that. > > > > How would you send arbitrary, non DOM element data, back to JHS? > > > > -- > > John D. Baker > > [email protected] > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > -- John D. Baker [email protected] ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
