close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Search Issue

Thread began 12/02/2010 9:11 am by hbibizadeh396670 | Last modified 12/03/2010 6:37 am by Jason Byrnes | 2191 views | 8 replies |

hbibizadeh396670

Search Issue

Hi

I have made the profile pages work, however I have a small but also new issue.

I have made a public gallery. I put a link in my menu bar to the results page.

The results page shows all the images, and has a search.

When a user searches the results page returns with the required results.


However when the user clicks on the public image gallery option in the menu bar, trying to see all the results again, the page just returns with the same search results that the user searched for.

How do I make the results show everything unless a search has been conducted

Sign in to reply to this post

Jason ByrnesWebAssist

for pagination to work on the results page, the search is stored in a session,

Send me a copy of the results page so I can see the name of the session that is being created and can show you how to create a link that will clear the search.

Sign in to reply to this post

hbibizadeh396670

Ok thanks

But I have 3 results pages. One for video, photos and articles.

So I need three fixes

Attached Files
Results_Pages.zip
Sign in to reply to this post

Jason ByrnesWebAssist

in each results page there will be a section of code similar to:

if (1 == 1) {
$_SESSION["WADbSearch1_articlestable_Results"]=$WADbSearch1->whereClause;
}


this is storing the search in the session named WADbSearch1_articlestable_Results


each result page may use a diferant session name, so check the code.


then create a link:

php:
<a href="articlestable_Results.php?search=clear">Reset Search</a>




and add an if statement at line 1 of the page to clear the search session if the querystring is present:

php:
<?php

if(isset($_GET['search']) || $_GET['search'] == 'clear') {
    unset(
$_SESSION["WADbSearch1_articlestable_Results"]); 
}
?>
Sign in to reply to this post

hbibizadeh396670

Ok well I have tryed it but I have some issues.

I would like instead of a reset link to just add the code to the end of the link in my css menu writer menu link

/PublicPhotoPages/imagetable_Results.php?search=clear

this works fine,

However when I add the code

<?php
if(isset($_GET['search']) || $_GET['search'] == 'clear') {
unset($_SESSION["WADbSearch1_articlestable_Results"]);
}
?>

to the results page my css menu writer menu is destroyed

Is this because I am using a template

Not sure what to do

Sign in to reply to this post

Jason ByrnesWebAssist

sorry, this line:
if(isset($_GET['search']) || $_GET['search'] == 'clear') {

should be:
if(isset($_GET['search']) && $_GET['search'] == 'clear') {

Sign in to reply to this post

hbibizadeh396670

Ok

Well It does work, which is good. But It seems to need something.

After a search users click on the menu nav bar link which links to the same page in order to see un filltered results.

However, every time users need to click on the menu two times for the results to return normally

Why is this happening

Sign in to reply to this post

hbibizadeh396670

Sorry Fixed.

Just needed to move the code up on the page.

Thanks for the help!!!

Sign in to reply to this post

Jason ByrnesWebAssist

OK, glad to hear it is working.

Sign in to reply to this post

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