Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help with categories drop down menu please


rabbitseffort

Recommended Posts

I have a dropdown menu I will be using for a new project I am building, the drop down functions as it should, I only want to change the submit from a button to simply a click category name and go there---ie: no button

 

Forms just aren't my bag I guess :rolleyes:

here is what I have started that works well with a button--I know index_main is not stock :huh: It's ok, it is on purpose :thumbsup:

<form method="get" action="index_main.php">
		  <?php echo tep_draw_pull_down_menu('cPath', tep_get_categories(array(array('id' => '', 'text' => 'Browse Products')))); ?> 
				  <input type="image" src="images/search-button.gif" border="0">
		</form>

 

Iwant to change this to onclick or similar to go straight to the category path

<input type="image" src="images/search-button.gif" border="0">

 

Maybe I need to assign something like:

$catid = $categories['categories_id'];

 

and onclick to be something like:

<a href=index_main.php?cPath=$catid></a>

 

???

 

Thanks in advance!

"I must admit that I personally measure success in terms of the contributions an individual makes to her or his fellow human beings."

---Margaret Mead---

 

"The answer is never the answer. What's really interesting is the mystery. If you seek the mystery instead of the answer, you'll always be seeking. I've never seen anybody really find the answer -- they think they have, so they stop thinking. But the job is to seek mystery, evoke mystery, plant a garden in which strange plants grow and mysteries bloom. The need for mystery is greater than the need for an answer.

--Ken Kesey"

Link to comment
Share on other sites

try

<form method="get" action="index_main.php">
		  <?php echo tep_draw_pull_down_menu('cPath', tep_get_categories(array(array('id' => '', 'text' => 'Browse Products'))), '', 'onChange="this.form.submit();"'); ?>			  
</form>

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

You are so great Monika, thank you so much!

"I must admit that I personally measure success in terms of the contributions an individual makes to her or his fellow human beings."

---Margaret Mead---

 

"The answer is never the answer. What's really interesting is the mystery. If you seek the mystery instead of the answer, you'll always be seeking. I've never seen anybody really find the answer -- they think they have, so they stop thinking. But the job is to seek mystery, evoke mystery, plant a garden in which strange plants grow and mysteries bloom. The need for mystery is greater than the need for an answer.

--Ken Kesey"

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...