close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

search results

Thread began 1/12/2015 5:20 am by Jamie | Last modified 1/16/2015 8:48 am by Jason Byrnes | 2464 views | 15 replies |

Jamie

search results

Hi Jason

Am trying to set up a search facility which displays content based on db entriers.

In the db, I have columns set up (just using a couple here to show)

PortfolioWebsite
PortfolioEcommerce
PortfolioBranding

Each column is set to be either 0 or 1 ( 0 being 'disabled' and 1 being 'enabled')

What I am trying to do is when the user selects, for example, 'Branding' from the drop down the results page fetches only content that is set to 1 in the PortfolioBranding column, or if they selected 'Web Design' from the drop down, the results would fecthg only the content set to 1 from the
PortfolioWebsite column.

Have attached basic files that I have been playing with to this effect.

Cheers

Jamie

Sign in to reply to this post

Jason ByrnesWebAssist

you won't be able to do this in DataAssist Search, you will need to configure the recordset for this.

the recordset details are a bit complex to describe here, contact me through Skype and I can walk you through it.

Sign in to reply to this post

Jamie

thanks very much for your help and guidance on getting that RS set up.

Jamie

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

Sign in to reply to this post

Jamie

last question for this one, how do I get the drop down to display the selected <select>? http://www.motley.co.uk/portfolio.php

Sign in to reply to this post

Jason ByrnesWebAssist

in design view, elect the select list, then in the property inspector, click the dynamic button. click the lightning bolt next to Select value equal to and select the binding for the select list.

Sign in to reply to this post

Jamie

when I try that I get an error http://prntscr.com/5sf89f

have tried resetting the workspace, deleting the dw cache file

Sign in to reply to this post

Jason ByrnesWebAssist

Try uninstalling the MySQLi server behaviors and installing it again, make sure you have the latest version.

Sign in to reply to this post

Jamie

nope thats not worked. Uninstalled, reset and deleted cache, re-installed reset and deleted cache and tried again and getting same error

Sign in to reply to this post

Jason ByrnesWebAssist

Seams to be a bug with MySQLi server behaviors setting a dynamic Select Value Equal to when all the values are static. I will log this as a bug, here is the updated select element code with the select value equal to change made:

<select name="PortfolioSearch" onchange="this.form.submit();" style="width: 380px; height: 40px; font-size: 18px; border: none; background-color: #E74E2E; color: #fff; padding-left: 10px;">
<option selected value="" <?php if (!(strcmp("", ((isset($_POST["PortfolioSearch"]))?$_POST["PortfolioSearch"]:"")))) {echo "selected=\"selected\"";} ?>>Select A Service Section</option>
<option value="Webdesign" style="padding: 5px 0 5px 10px; border: none;" <?php if (!(strcmp("Webdesign", ((isset($_POST["PortfolioSearch"]))?$_POST["PortfolioSearch"]:"")))) {echo "selected=\"selected\"";} ?>>Webdesign</option>
<option value="eCommerce" style="padding: 5px 0 5px 10px; border: none;" <?php if (!(strcmp("eCommerce", ((isset($_POST["PortfolioSearch"]))?$_POST["PortfolioSearch"]:"")))) {echo "selected=\"selected\"";} ?>>eCommerce</option>
<option value="SEO" style="padding: 5px 0 5px 10px; border: none;" <?php if (!(strcmp("SEO", ((isset($_POST["PortfolioSearch"]))?$_POST["PortfolioSearch"]:"")))) {echo "selected=\"selected\"";} ?>>SEO</option>
<option value="Email" style="padding: 5px 0 5px 10px; border: none;" <?php if (!(strcmp("Email", ((isset($_POST["PortfolioSearch"]))?$_POST["PortfolioSearch"]:"")))) {echo "selected=\"selected\"";} ?>>Email</option>
<option value="Copywriting" style="padding: 5px 0 5px 10px; border: none;" <?php if (!(strcmp("Copywriting", ((isset($_POST["PortfolioSearch"]))?$_POST["PortfolioSearch"]:"")))) {echo "selected=\"selected\"";} ?>>Copywriting</option>
<option value="Social Media" style="padding: 5px 0 5px 10px; border: none;" <?php if (!(strcmp("Social Media", ((isset($_POST["PortfolioSearch"]))?$_POST["PortfolioSearch"]:"")))) {echo "selected=\"selected\"";} ?>>Social Media</option>
<option value="Branding" style="padding: 5px 0 5px 10px; border: none;" <?php if (!(strcmp("Branding", ((isset($_POST["PortfolioSearch"]))?$_POST["PortfolioSearch"]:"")))) {echo "selected=\"selected\"";} ?>>Branding</option>
<option value="Marketing Material" style="padding: 5px 0 5px 10px; border: none;" <?php if (!(strcmp("Marketing Material", ((isset($_POST["PortfolioSearch"]))?$_POST["PortfolioSearch"]:"")))) {echo "selected=\"selected\"";} ?>>Marketing Material</option>
<option value="Books and Magazines" style="padding: 5px 0 5px 10px; border: none;" <?php if (!(strcmp("Books and Magazines", ((isset($_POST["PortfolioSearch"]))?$_POST["PortfolioSearch"]:"")))) {echo "selected=\"selected\"";} ?>>Books and Magazines</option>
<option value="Vehicle Graphics and Signs" style="padding: 5px 0 5px 10px; border: none;" <?php if (!(strcmp("Vehicle Graphics and Signs", ((isset($_POST["PortfolioSearch"]))?$_POST["PortfolioSearch"]:"")))) {echo "selected=\"selected\"";} ?>>Vehicle Graphics and Signs</option>
</select>
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...