close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

DataAssist Search / Result / Clear Result

Thread began 3/08/2009 12:30 pm by muddysmurf314415 | Last modified 9/16/2009 8:27 am by tige247759 | 6656 views | 12 replies |

muddysmurf314415

DataAssist Search / Result / Clear Result

First of all I'm probably doing something stupid to make this not work, but I need some help.

I've set up my search form to search a certain table in my database. My results page comes up with the certain number of results on the page. I have a button to go back to the page that lists all of the items in my table. When you click that button, it then goes to that page but keeps the search results. I'd hit f5 and it wouldn't change, then I would clear cache and cookies in Firefox (newest version and IE7) and it would show up what I wanted.

Well I then enabled a clear session variable (using Cookie Toolkit) and set a cookie for -20 days on page submit (from my results page). Then when you clicked the link it would take you to the same results you looked for, but this time if you hit f5 it would refresh to every listing in my table (what I wanted).

What am I doing wrong? I need this to work on the first time when someone wants to list all of the table data.

Thanks!

Sign in to reply to this post

Danilo Celic

The DataAssist search results page has built in functionality that causes any search to be saved so that if the visitor comes back to the page (such as going to the detail page and then update page and then back to the results page) that the search will still be present.

If that isn't the desired behavior, then you can work around it by linking to the results page and add in a "fake" query string value such as results.php?clear=true

This will cause the "search save" feature to think that another search is being performed with no search criteria (assuming that "clear" isn't the name of one of your search fields), which will show all of the records.

HTH

Sign in to reply to this post

muddysmurf314415

Originally Said By: danilo
  The DataAssist search results page has built in functionality that causes any search to be saved so that if the visitor comes back to the page (such as going to the detail page and then update page and then back to the results page) that the search will still be present.

If that isn't the desired behavior, then you can work around it by linking to the results page and add in a "fake" query string value such as results.php?clear=true

This will cause the "search save" feature to think that another search is being performed with no search criteria (assuming that "clear" isn't the name of one of your search fields), which will show all of the records.

HTH  



I couldn't get that to work, so I searched the code on the results page, and just took out the portion that saved the session. I'll add it back if I start to run into some problems, but it seems to work pretty good right now lol

Thanks!

Sign in to reply to this post

Danilo Celic

Well, I guess that that is always an option. :-) Good luck with your project.

Sign in to reply to this post

Ray BorduinWebAssist

What will break in this scenario is results pages with pagination... since when you navigate to the next page it will clear the results and show the second page of an unfiltered recordset.

If you don't ever use recordset pagination and show all of the records on the first page, it wouldn't be a problem.

Sign in to reply to this post
Did this help? Tips are appreciated...

muddysmurf314415

Originally Said By: Ray Borduin
  What will break in this scenario is results pages with pagination... since when you navigate to the next page it will clear the results and show the second page of an unfiltered recordset.

If you don't ever use recordset pagination and show all of the records on the first page, it wouldn't be a problem.  



That makes sense. I will probably add that later on, as there are not that many items for this page at the time.

Do you think if I create another recordset (that's basically the recordset I'm searching, just another name) on the page I want to go back to (the show all button) that it will work how I need it to?

Sign in to reply to this post

Ray BorduinWebAssist

All you have to do is create the show all button to trigger the dataassist search server behavior. I beleive the trigger is based on a GET variable. Just add that trigger value to the link with any value and the result set will be cleared.

Sign in to reply to this post
Did this help? Tips are appreciated...

pdesignz

Could you explain in more detail how to do this.

Thanks

Sign in to reply to this post

Ray BorduinWebAssist

Open up the dataassist server behavior. Note the value of the trigger.

If it has something like $_GET['thisvalue'] in the trigger, then a link to the page like:

page.php?thisvalue=0

would clear the filter.

Sign in to reply to this post
Did this help? Tips are appreciated...

muddysmurf

Thanks, Ray! I will try this when I get home. I'm a full time web designer - and then I'm a freelancer when I get home haha Seems I can't get enough of web design and Web Assist Products have helped TREMENDOUSLY!

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...