[support] Normal search box form is send only there is #type => submit

Ivan Sergio Borgonovo mail at webthatworks.it
Fri May 30 13:00:52 UTC 2008


On Fri, 30 May 2008 14:27:32 +0200
Davide Michel 'ZioBudda' Morelli <michel at ziobudda.net> wrote:

> Ivan Sergio Borgonovo ha scritto:
> > I think FAPI does some check on the existence of a '#type'=>
> > 'submit'.
> > Furthermore to get the onClick event you don't have to wrap an
> > anchor around the button you'd just have to add attributes to
> > the form element.
> >   
> an anchor around the button ???
> I don't have an anchor around the button. I want to eliminate the
> button and leave only the "<a href....> >> </a>" (or imagine a
> GIF). I can delete it via unset but then the form does not works.
> So I can delete it via CSS (display:none), but I ak myself why
> this. I think that there is some type of check, too.

This is easier obtained with something like:

<input id="search_submit" type="image"
src="somewhere/search.gif" name="op"
value="Search"  />

At least in D5. op was deprecated. I don't know if it is still alive
in D6.

> > Actually... if you dig into jQuery you may discover there is
> > already something ready to do exactly what you'd like in a more
> > drupalish way.

> Do you know some exact url ?

I'm not a JS guru. Drupal uses ahah and JQuery libraries for JS.
There are some books about JQuery, I don't know about ahah.
Then there should be some docs on Drupal integration on drupal web
site.

-- 
Ivan Sergio Borgonovo
http://www.webthatworks.it



More information about the support mailing list