close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Search triggered by menu selection, menu's holding selection after visiting another page

Thread began 7/17/2019 12:51 pm by Justin@AdventDesign | Last modified 7/22/2019 9:12 am by Ray Borduin | 307 views | 3 replies |

Justin@AdventDesign

Search triggered by menu selection, menu's holding selection after visiting another page

Working with this page http://teamconstructioninc.com/inspiration/detail.php?room=10&Search=Search&WADbSearch1=Submit

The client would like to have the search triggered automatically by any one of the menus being selected as opposed to selecting the menu and then pressing the search button. How would I go about doing this?

Secondly, on another search/results page http://teamconstructioninc.com/homes/semi-custom/ ... It does great holding the menu selections as the user searches. However, if the user navigates away to another page and then returns, the search results still hold the criteria, but the menus no longer reflect the selections and appear as if the user is looking at all results. We want it to hold the search as it does, but we want the menu's to reflect that properly even if the user navigates away.

Sign in to reply to this post

Ray BorduinWebAssist

Triggering the search automatically can be done simply by using the onchange event to submit the form: onchange="this.form.submit()"

However that will cause a page refresh and would make doing multiple selections in the three lists very awkward as the page refreshes. The better way to do it is to put the results into a plugin and refresh it with AJAX using the onchange event. This can be done using the same technique as described in the dynamic dropdowns tutorial, you are just refreshing the results instead of a second dropdown: http://www.webassist.com/tutorials/Dynamic-Dropdowns-with-Data-Bridge-2-0

To maintain the values in the select lists, just save their values into session variables or use the persist form server behavior to save their values and pre-populate them with the saved value from the session.

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

Justin@AdventDesign

I'll look into the AJAX function... in the interim I tried to do the onchange, but it's not working to put it into the form tag like the following:

<form class="search-form" id="Search_Basic_Default" name="Search_Basic_Default" method="get" action="detail.php#photo-results" onchange="this.form.submit()" >

Where is it supposed to go?

Sign in to reply to this post

Ray BorduinWebAssist

in the <select> menus you want to submit onchange... not the form.

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

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