Jump to content

Performing an action upon GET autochange dropdown


dc_jt

Recommended Posts

Hi Ive got the following drop down menu and I want to perform an action every time someone uses the dropdown. How Can I determine when it has been used? Normally I would pass in a mode but because its GET, I cant and if i change it to POST, it doesnt work how I want it to?

 

Thanks

 

<select name="iCat_Id" onchange="CatChange.submit()">
<option value="0">-- All Offers --</option>

<?php 
	//Get categories for this site
$rCategories = $oTblCategories->GetCategories();

while ($oCategories = mysql_fetch_object($rCategories))
	{?>
<option value="<?=$oCategories->category_id?>"<?=($iCatId == $oCategories->category_id)?' selected="selected"':''?>>
<?=$oCategories->category ?></option>

   <?php } ?>	
</select>
</form>

Link to comment
Share on other sites

Thanks for the reply, I already know that. My drop down works fine but its when I change pages I wanted to set the start to 0 when the category is changed. I have done it now however by passing in a hidden mode and then doing if($_GET['mode'] == changeFilter) {

$iStart = 0;

}

 

Thanks anyway for your help

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.