1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2013
    Rep Power

    Challenge for Web Design Experts/Gurus

    OK... here's the challenge.
    I am converting a VB6 app to Web-based for my client.
    The VB6 app has been running very well for many years, and uses a MSAccess database.

    So, I am converting it to Web-based, using raw HTML, Javascript, and ASP for the database functions.

    A particular scenario for some logic is:

    To perform a particular task (Table Cleanup/purge of old records),
    the client must provide a date (all complete records earlier than this date will be purged), and can also specify which tables to be affected (6 possible ones).

    So I provide an HTML screen which has a JQuery calendar built-in so they can provide the date. This screen also has 6 checkboxes with table names described, so they can check any number of tables to be processed.
    I also have a borderless text box beside each checkbox, which will display a status message during the processing.
    (You all know how clients HATE to have something happening without some indication that it is going on).

    Here's what I have built.
    An HTML screen to provide for specifying the date, and which of the 6 checkboxed tables to work with. This screen actually has a FORM, although that is not really necessary with my current design.

    When they then select/click on the "doit" button, I invoke a javascript routine to edit the date for reasonableness (must be more than 1 year earlier than today). If all is OK, I then use a javascript Window.Open call (to do a Popup), to invoke an ASP routine to do the actual database work.

    1. This of course does open a window (I have made it as small as possible), but it still displays for the time the work is being done.
    2. Because it is a Window.open call, I have to pass all the values to the routine via parameters, because I am not using a "submit" which would allow the called routine to obtain the checkboxes and date from the submitted form.
    3. I am using a Window.open call, so I can (in the invoked routine) place status messages in the borderless text boxes on the main screen, giving status updates. I do this via the document.opener capability.
    4. After all the work is done I close the invoked window via Window.Close.

    This is all working great.

    The challenge....

    Hints/suggestions to do this so....
    1. Still get user input about the date, and which tables to work with.
    2. Invoke the database routine WITHOUT having to pass parameters to it. (Have it get the info from the main routine)
    3. Have the database routine NOT appear at all.
    4. Have the database routine update status information on the
    main page.
    5. Have the database routine close after work is completed and return back to the updated main page.

    As I said, I have already built it all, and it is all working as I have described. I would just like to have a few "improvements"
    (not pass parameters to the database routine, not have the database routine visible).

    I appreciate any recommendations/suggestions.
  2. #2
  3. Wiser? Not exactly.
    Devshed God 2nd Plane (6000 - 6499 posts)

    Join Date
    May 2001
    Bonita Springs, FL
    Rep Power
    Use XMLHTTPRequest (aka Ajax) rather than a window.open call to keep the processing in the background without a visible window. You can still provide status updates via the onreadystatechange event.
    Recycle your old CD's

    If I helped you out, show some love with some reputation, or tip with Bitcoins to 1N645HfYf63UbcvxajLKiSKpYHAq2Zxud
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2013
    Rep Power
    Thank you Kicken,

    I'll have to research/learn about Ajax.

    Sounds/looks like a great solution.

IMN logo majestic logo threadwatch logo seochat tools logo