integrate search from with prefilled init value integrate search from with prefilled init value
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

integrate search from with prefilled init value

Started by hmmwv, February 07, 2004, 01:14:01 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hmmwv

hi
i´d like to integrate a search form with the album title filled in as init value.
can anybody help me with this? i´ve already tried a few things, but i can´t get it working  :x

the code for the searchbox is:
<table width="324" height="50" cellpadding="0" border="0" style="border-collapse:collapse;">
                        <tr>
                          <td width="320" height="46">
                            <table width="100%" cellpadding="0">
                              <tr>
                                <td width="100%" align="center">
                                  <table>
                                    <tr>
                                      <td align="right" style="color:000000;font-family:verdana, helvetica, sans-serif;font-size:10px;">Search for Posters:  </td>
                                      <td align="left"><input type="text" name="Search_String" maxlength="100" size="23" value={ALBUM_TITLE}></td>
                                      <td><input name="image" type="image" src="http://images.art.com/images/aff/searchbox/go.gif" alt="Search Now"></td>
                                    </tr>
                                </table></td>
                              </tr>
                          </table></td>
                        </tr>
                                      </table>
                    <input type="hidden" name="T" value="15033145">
                    <input type="hidden" name="A" value="750842">
                    <input type="hidden" name="L" value="12">
                    <input type="hidden" name="P" value="0">
                    <input type="hidden" name="S" value="3">
                    <input type="hidden" name="Y" value="1">



i´d like to place the searchbox between the breadcrumbs and the thumbnails-table.
thx.
hmmwv

Joachim Müller

I don't get the point. What is above piece of code supposed to do? You can't insert this stuff into template.html and hope it works.
    Reasons:
  • you can use {ALBUM_TITLE} this way
  • you didn't specify a <form> tag
  • there are no php vars $T, $A, $L, $P, $S, $Y specified - no use in putting them into hidden fields[/list:u]Please give a more in-detailed description what you search form is supposed to to, where you want it to appear etc. instead of code that only is wishfull thinking...

    GauGau

hmmwv


Casper

so what you want is a drop down box, where the user just selects which album to search for.  Is this what you want?
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

hmmwv

no, i want a search form for an affiliateprogram like allposters which is prefilled with the albums name

Joachim Müller

in this case you'll need a bit of JavaScript to do the magic: insert it into the <form> tag (with onSubmit) - the JavaScript then manipulates the existing search form, adding the additional parameters to the user input and returning it to the form, which is then submit to the server.
As I said before: the code you posted above is bull (it displays stuff in HTML, but the data you send in the form won't be taken into account by the form-processing script.

GauGau