Hello all,
I am using the additional pages plugin as a launch page on my site. What I'd like to do is have a series of images which can be clicked to launch a predefined search of my images. Now its fairly easy to get a search form on the additional page like this:
<div class="myHomePage_links">
<form action="qsearch.php" method="get" id="quicksearch">
<p><input type="text" name="q" id="q"style="background-color: #848484; color: #ffff66;width:180px;height:30px;border:2px;groove #F00;"value="search" onfocus="value='';"></p>
</form><br>Enter search <br>words then ↩</div>
but I cannot get it to work using an image - or at least I can get what seems to be an empty search because clicking the image launches the 'search result' page. I cannot figure out where to put the predefined search value - lets call it "cats"
<form action="qsearch.php" method="get" id="quicksearch">
<a href="#" onclick="document.forms[0].submit();return false;"><img src="http://www.my+++site/mhj/pics/9.jpg" /></a>
</form>
Where can I put the search string "cats" for this to work - I have tried everywhere!!
your help will be hugely appreciated
and best wishes all for a cracking piece of software
Offline
Hello
juste put an input type hidden with the same id/name name="q" id="q" and withe your value, and the image as a submit button for the form
Offline
thanks flop25, thats a great help. Finally got it to work like this:
<form action="qsearch.php" method="get" id="quicksearch">
<button type="submit" name="q" id="q" value="cats" style="height:257px; width:257px" onclick="document.forms[0].submit()";return false;"><img src="http://www.yourwebsitepath/pics/6.jpg" /></a>
</form>
the 257px is my image size, still a little bit of table formatting to sort out but nearly there.
many thanks and I hope this is useful to someone else
Offline