close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

hiding search

Thread began 5/29/2018 6:05 am by Jamie | Last modified 5/29/2018 12:25 pm by Ray Borduin | 2195 views | 21 replies |

Jamie

hiding search

Hey Ray

How would I display this

<div class="coffee-span-12 resultsRows">
<span><strong>You searched:</strong>
<?php if($_POST["SearchContent"] != ""){ ?>
<?php echo $_POST["SearchContent"]; ?>
<?php } else { ?>
search was empty
<?php } ?>
</span>
</div>



only if the search button has been clicked on the attached page?

thanks

Jamie

Sign in to reply to this post

Ray BorduinWebAssist

You might try:

php:
<?php

if (isset($_SESSION["WASearch_Recordset2"])) {
?>
// show this when a filter is applied
<?php
}
?>



or

php:
<?php

if (isset($_POST["WADbSearch1"]) || isset($_POST["WADbSearch1_x"])) {
?>
// show this when a filter is applied
<?php
}
?>



The problem with the second one is that it wouldn't show after navigating to the next page of results.

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

Jamie

thanks mate - how would I set up the first one?

Sign in to reply to this post

Ray BorduinWebAssist

Just put the code on the page manually wrapping your html that you want showing conditionally.

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

Jamie

sorry, understand that bit - just not sure where the WASearch_Recordset2 session comes from?

Sign in to reply to this post

Ray BorduinWebAssist

That session variable is automatically set by the search server behavior whenever a search is performed. That is how the search is maintained from page to page when navigating through the recordset.

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

Jamie

ah right...I'm afraid that this doesnt work. It doesnt show the message at all

Sign in to reply to this post

Ray BorduinWebAssist

Is there a URL where I can take a look?

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

Jamie

sure, am in the final stages of the CMS that youve helped me with a coupe of times.

If you login with the usual and head to 'Content' and then 'Blog' - its the blog_results.php page

Sign in to reply to this post

Ray BorduinWebAssist

Your recordset is named: WADAblog

You had to replace that bit in the code chunk, so it should have been:

php:
if (isset($_SESSION["WASearch_WADAblog"])) {
Sign in to reply to this post
Did this help? Tips are appreciated...
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...