Jump to content

Need some help with my search box please ..


teamv

Recommended Posts

Hi all, i would like some help with something if you would be so kind.

I have this search box in my header ..

[img]http://www.varidev.co.uk/misc/searchbox.jpg[/img]


With this code.

<div style="padding:5px;">
<form method="get" action="http://www.xxxxxxx.com/yyyyyy/">
<table style="width:50%;" cellpadding="5">
<tr>
<td style="vertical-align:top;font-size:9pt;">
input type="text" value="search ..." id="search" onkeyup="searchSel()">
<SELECT id="groups">
<option value="">Select:</option>
<option value="user">Users</option>
<option value="event">Events</option>
<option value="gallery">Gallery</option>
</select>
<input type="submit" value="Go" class="mainmenu66" onmouseover="this.className='mainmenu77';" onmouseout="this.className='mainmenu66';"
</div>
</td>
</tr>
</table>
</form>


And am trying to do 2 things.

1. Remove the 'go' button, and have it execute the search when the user selects an option from the drop down box.

2. The 'action' of the form to goto a different place depending on the users selection within the drop down box -

So; if they select 'Users'.. it goes to xxxxxx.com/searchusers, if they select events it goes to xxxxx.com/searchevents etc.

Can anyone give me some ideas/code as to how i can implement this, i can edit and code VERY basic PHP but this is way beyond my level. Or, if  anyone has some example code or something to help me along that would be awesome too? Have't had much luck with google when i searched for stuff ...

Thanks to any and all who input into the thread :)

Ric

EDIT: This is within the phpFox content management system if tat has any bearing on things. It is in one of the tpl files, but php works within it too. Just not sure how to implement A: In the PHP, and also how to integrate that code into my tpl file. Is all very confusing  hehe :-\ ;)
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.