Print page
Blazing Images Web Site Design, Inc.
Main Menu
  • Home
  • About Us
  • Our Services
    • Web Design
    • Dynamic Development
    • Hosting
    • Promotion
  • Contact Us
Search

Our Blogs
  • WebAssist
  • Joomla!
  • Technical Support
  • jQuery & jQuery UI

Sortable Rows with Data Assist Version 2

PDF Print Email
© 2013-03-03 by Steven

I have updated the WebAssist reoder code to make it easier as I am updating a significant number of files and wanted to reduce the headache. Be warned. This has not undergone extensive testing, but it is WAY easier than before.

Here are the files: reorderDA2.class.zip

FILE UPDATED 3/19/2013.

  • The code was checking for whether the query was sorted by the sort colum but not adding it to the query. Fixed

FILE UPDATED 3/31/2013.

  • If you set the rows to show more records and the page number value became invalid, and error would be thrown. Now it steps back one page at a time until it finds the correct page to display. Fixed

 

The instructions are similar to the original post HERE, so I will make this brief.

  1. Follow the first step and include the file only the current name is reorderDA2.class.php

  2. Next, and this is where it gets easier, just include the following below the WADA Databridge recordset.
    reorder2 01

    Now the parameters are just the text portion of the connection variable and the table name.
    If your cannection variable is $connReorder, the first parameter is "connReorder".
    Also include the sort column name if it is not sortorder.
    Lastly you can include an array for the choices on how many records to display, so it looks like this:
    connection (string), table name (string), sort column name (string), display # records (array)
  3. Next follow the step for inserting the head code, and that is it.
  4. If you are using the current version of WADADB, your're done, but if you are using a custom form, or you are adding this to an old form, you need to follow the step to adjust the table.

I've tested this against the old and new forms. I'm using the WebAssist=>Database=>DataAssist Pages gui to generate the pages, so if you're making custom forms and it doesn't work, please let me know, though I may not do anything about it, if it is easy, I will. I'm basically generating the pages using this GUI with no template and then adding the template (or theme) afterwards. This is designed for site backend use, so custom page structures are generally not needed.

If it works for you the way it is working for me, this method adds all thepage elements you need and even adds the sort column to the query if you forgot to add it since it is generally not displayed. Updating some of my ADDT and older WADA pages just got easier!.

Hope this helps.

Steven


Comments
DL
-
2013-11-18 at 12:47
I am getting an error on line 37 of reorderDA2.js. Concole erros says "undefined' is not a function (evaluating 'tmp.indexOf("?")')

Any idea how to fix this?
DL
-
2013-11-18 at 13:08
Further related issue:

With PHP error reporting turned on, i get the following error:

Notice: Undefined index: showRows in /home/mydomain/www/www/siteroot/scripts/reorder/reorderDA2.class.php on line 125

Any help understanding how to fix this would be greatly appreciated. I have used your code with WA for may years using DataAssist, but this is my first attempt at using it with DataBridge.

DL
Steven
-
2013-11-18 at 15:26
Use the contact us link to send me your email address. If you send me the file and/or a link to the page, I may be able to figure out what is wrong with your first problem.

The second one is a minor issue. Not an error, a notice. It just means that the variable has not been assigned. I can update the file to prevent that however, but the real error requires me to see what you did.
Sades
-
2013-12-26 at 14:02
im getting with the new script this msg: No ID was located for ROW 1, also when donwloading the tablednd.js it seems the site has update to a new version that doesnt work with your code but i had the old one saved
Steven
-
2014-01-01 at 13:48
Use the contact form and send me your contact information, and I would be happy to take a look. If you are using the "very automated" method, you are restricted in what modification you can make to the data table html structure. I'd need to look to tell you what happened there.
Leave a Comment
Captcha
Enter text shown in left:
Copyright © 1996-2023 Blazing Images Web Site Design, Inc. All rights reserved.