1

I am trying to get the jquery datatables plugin pulling data using VBScript instead of PHP as shown on their website. Has anybody any advice on where to start or maybe seen this already implemented somewhere else?

Any assistance would be great!

3
  • To get tthis clear, you want to use VBScript on the client and not JavaScript? or is this VB on the server and NOT .net? Commented Mar 8, 2010 at 12:39
  • Hi Mark, thanks for getting back to me! I want to write a script (vbscript/classic asp) that will sit on my server. It will get called/referenced by: "sAjaxSource": "../examples_support/server_processing.asp" The .PHP script is already available on the following page: datatables.net/examples/data_sources/server_side.html ...any ideas? cheers! D Commented Mar 8, 2010 at 13:47
  • by the way, I am very proficient in scripting in vbscript, but havent made the jump into .NET! ...and the PHP code mentioned above may as well be chinese to me! ;o( Commented Mar 8, 2010 at 13:55

1 Answer 1

4

I'm not sure how familiar you are with the javascript grid/ajax model, so here is an outline:

1) you have an (X)HTML page that includes a table (which might be rendered by classic asp):

<table id="tableIDhere">
    <thead>
        <tr>
            <th>Rendering engine</th>
            <th>Browser</th>
            <th>Platform(s)</th>
            <th>Engine version</th>
            <th>CSS grade</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td colspan="5" class="dataTables_empty">Loading data from server</td>
        </tr>
    </tbody>
</table>

2) you then make a jQuery call to enhance the table with the behaviour expected of a datagrid

$(document).ready(function() {
    $('#tableIDhere').dataTable( {
        "bProcessing": true,
        "bServerSide": true,
        "sAjaxSource": "../name_of_your_asp_page.asp"
    } );
} );

3) when the jquery datagrid has initialised, it will make a call to your classic asp page (../name_of_your_asp_page.asp) expecting a specific format of data to be consumed by the datagrid

{"sEcho": 3, 
"iTotalRecords": 57, 
"iTotalDisplayRecords": 57, 
"aaData": [ 
["Other browsers","All others","-","-","U"],
["Misc","NetFront 3.1","Embedded devices","-","C"],
["Misc","NetFront 3.4","Embedded devices","-","A"]
] 
}

I'm not sure how you interact with a database normally (Through stored procedures/scripted SQL etc), if you're not sure I would start by looking at using a library like the ajaxed asp library - this should give you a flying start.

Hope this helps you make a start

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.