close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

From a button on the details page, return the user to search results page rather than full list of db entries?

Thread began 4/03/2017 1:45 pm by art226587 | Last modified 4/05/2017 11:16 am by Ray Borduin | 3141 views | 9 replies |

art226587

From a button on the details page, return the user to search results page rather than full list of db entries?

Hi, I have a search page with a pull-down menu that allows people to view only db entries with the status of Yes, No or Maybe. When someone selects Yes and clicks search, they get a page containing only db entries that have status=Yes. When someone clicks a details link, they see the full details page and that's all great. However, there's a "back to results" button on that details page that simply returns the user to a page containing all of the db entries, not the search results they were viewing.

Is there a way to dynamically link that button to whichever search results page the user originally came from? I can't figure this one out! Thanks!!

Sign in to reply to this post

Ray BorduinWebAssist

How are you doing the search? That should happen automatically with our search server behavior.

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

art226587

Hi Ray, I think I know what my problem might be. I actually have two separate "results" pages. One is the main, unsorted listing page that displays everything in the db. The other is the results page that only displays the search results. I made it this way because I was having trouble getting back to displaying *all* entries because it seemed like the search query wasn't resetting. It would still show only the results of the last search rather than all entries. This would persist even if I entered the URL to the main listing page without any search parameters. Does this make sense?

Sign in to reply to this post

Ray BorduinWebAssist

Yes. You can usually pass the form button name in the url to reset the search otherwise it will persist. Using that technique instead of a separate page should solve your problems.

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

art226587

Thanks, Ray. Since I've done so many customizations to the results and details pages, I went ahead and regenerated clean ones using DA Pages and then copied the relevant bits over to my custom pages and the results page is showing the search results, not all of the entries. This time, however, I included the search form at the top, which has the option to show all and that way users will be able to view the data any way they like. I guess I was overthinking some of this. Thanks for your prompt help!

Sign in to reply to this post

art226587

One more pesky thing going on here. The dropdown menu in the search form at the top of the results page always reverts back to having the default selected - which is "All" - when returning there after clicking the 'Back to Results' button on any details page. It shows the correct count of entries ("1 - 20 of 149" for example) for whichever generated the search results page, but menu item selected is always "All." Is there a way to have it select the one that the user searched and is actually representative of the results on that page? I think I've done something like this before, but I can't figure it out. Thanks!

Sign in to reply to this post

Ray BorduinWebAssist

You can save the selected value in the session and re-select the value from the session. If you attach a copy of the results page I can help with that.

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

art226587

Great, thanks. Page attached!

Sign in to reply to this post

Ray BorduinWebAssist

Add this code to the top of the page:

php:
<?php

if (isset($_GET["Search"]) || isset($_GET["Search_x"])) {
  @
session_start();
  
$_SESSION['searchStatus'] = $_GET['status'];
}
?>


and then change the select list option from:

php:
<option value="<?php echo $row_WADAMenustatus['status']?>"<?php if (!(strcmp($row_WADAMenustatus['status'], (isset($_GET["status"])?$_GET["status"]:"")))) {echo "selected=\"selected\"";} ?>><?php echo $row_WADAMenustatus['status']?></option>



to:

php:
<option value="<?php echo $row_WADAMenustatus['status']?>"<?php if (!(strcmp($row_WADAMenustatus['status'], (isset($_SESSION['searchStatus'])?$_SESSION['searchStatus']:"")))) {echo "selected=\"selected\"";} ?>><?php echo $row_WADAMenustatus['status']?></option>
Sign in to reply to this post
Did this help? Tips are appreciated...

art226587

That worked perfectly! Thanks again for all of your help, Ray. I feel like a some of this stuff is pretty clear to me, but a lot of it is just beyond reach. This forum has saved my bacon on more than one occasion!

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...