0
votes

I'm interested to know if anyone has done any work in JQuery Mobile with classic ASP. It seems that PHP is a widely used server-side language with JQM but I can't seem to find anything with good ol' CLASP (I know it's old tech, but it's similarities to PHP are quite interesting). I have a long history with classic asp and would like to use that as opposed to learning PHP (if I avoid it).

Here are the details ...

I have an existing SQL database (on my server) with customer information that I want to simply list in JQM. It would be a three page app: Page1 - Logon (user authentication) Page2 - customer listing based on the customers associated (in the database) with the user's credentials Page3 - customer details - details of the selected customer from Page2

When the user submits the logon form, the app goes to the server and gets credentials. Those credentials are then used on Page2 to list the customers that have the user's ID as the account manager. The user then clicks a customer, and the customerID is passed to the customer details page which is used to pull specific customer data from the database.

The main difficulties I am having are - . the connection the SQL server database. How does javascript connect to the server-side and retrieve data? AJAX, JSON, web service? . how do I pass data from page to page? Credentials from the logon form, customer ID to the customer details page.

My preference would be to use ASP, with AJAX/JSON calls to populate the server-side data but I don't know where to start. Any assistance would be much appreciated. I would be happy to give some advertising space on my blog to anyone who can give a well-detailed explanation.

Thanks Steven w: http://www.stevenwoolston.com

1
If you want to get your hands dirty on classic asp, check here for a JSON serializer: code.google.com/p/aspjson I can't help you with the JQM stuff.. - AardVark71

1 Answers

0
votes

If the list of customers available to the logged-in user is not too large to make the download of a complete list unbearable, you may wish to generate a complete list server side and serve them all to the client as a UL LI list, wrapped within a JQM Search Form.

JQM will then provide the end user with a nice scrollable list with a simple search form at the top that will allow them to filter the list, without any client-server interaction, negating the need for you to provide JSON data.

The code for your "page 2" would therefor be something like this:

<html>
 <head>
  <title>Customers</title>
 </head>
 <body>
  <div data-role="page" id="home" data-add-back-btn="true">
   <div data-role="header" data-theme="">
    <h1>Customers</h1>
   </div>
   <div data-role="content">    
    <form role="search"></form>
    <ul data-filter-theme="b" data-filter-placeholder="Search Customers..." data-filter="true" data-role="listview">
     <li><a href="customerDetail.asp?CustomerID=1">Customer 1</a></li>
     <li><a href="customerDetail.asp?CustomerID=2">Customer 2</a></li>
     <li><a href="customerDetail.asp?CustomerID=3">Customer 3</a></li>
    </ul>
   </div>
  </div>
 </body>
</html>

Your "page 3", in the above example is the "customerDetail.asp" page, being provided with the CustomerID in the querystring, which you can access via

request.queryString("customerID")