Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to pass resultset object as a parameter to a javascript function  RSS feed

 
k kousalya
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai ,
I have one doubt. How to pass ResultSet object as a parameter to a java script function. Icould pass ResultSet object as a parameter. But my problem how access that object and how to get the data from that resultset and how to display that data in tabular form.
Could please any one help me.
Thanks in Advance
 
Andy Crane
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

To me it sounds like you may want to look into a javascript library that has a built in grid.

The one I have used most often for working with sets of data on the client side is Dojo. There are a few issues with Dojo, but overall it's not too bad an experience.

Basically, you assign your resultset to a json object, which is really just a hash object, and then you can use it as a regular recordset on the client side, you can query it, change values, display it in a grid with additional options for sorting, filtering, updating the data via ajax, etc.

Please note that this is NOT an advertisement for Dojo's javascript library. My preference is Jquery, Mootools then Yui. If I never code Dojo again I'll be happy

BUT, they have a good grid implementation. http://www.dojotoolkit.org/


BTW, there is another option... Go here: javascript documentation. You will find all of the different ways of accessing objects in javascript here. There are different ways of getting the properties of the object, depending on the type of object, and the types of data in that object. At the end of the day though, an object in javascript consists of name - value pairs that contain any sort of data that javascript supports. That's the key to determining how to access your data.


- andy c
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!