Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

radio-fying the search box


vladi

Recommended Posts

I am trying to make changes to the code so that users can dynamically change wheather they search in only titles or both titles and discriptions. Basically, there are two radio buttons right under the search text. Clicking one would search only in titles and clicking the other would search both titles and descriptions.

check it at

http://66.246.52.171/shop/default.php

This is an expansion on Mathew's contribution.

 

It does work, but for some mysterious reason I have to reload the browser twice when switching from one to the other radio buttons in order to get it to work.

I know i am getting it right, because after i reload the browser twice

i can see in the browser bar the change from

search_in_description=1 to search_in_description=0 or vice versa.

The only place I have changed the code is in catalog/include/boxes/search.php

 

Do you know what might be the problem? Why do I have to reload twice to get desired results?

Try testing it with 'vince' which occurs in descpiptions but not in titles.

First click title search and type in 'vince', nothing comes up. Then click

keywords and click search (nothing comes up). Then click it again, and you get the desired search results.

the modified version of the code is at

http://66.246.52.171/shop/images/dvd/search.txt

Thanks for your help

Vladimir

Link to comment
Share on other sites

AFAIK radio buttons need to return TRUE don't they?

Also look at GET vs POST for your form

 

Mattice

"Politics is the art of preventing people from taking part in affairs which properly concern them"

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...