submitting form to /search.aspx with input type="image" fails Options
apt-get
Posted: Thursday, January 10, 2008 1:17:09 AM
Rank: Newbie

Joined: 10/30/2007
Posts: 5
I have a form in on every page that submits to /search.aspx

We need to have a pretty button so i'm using <input src="/search_out.png" type="image" id="button" value="Submit" alt="Submit"> to submit the form.

<form id="search-box" method="post" action="/search.aspx">
<input src="/search_out.png" type="image" id="button" value="Submit" alt="Submit">
<input type="text" name="umbSearchResult_6$searchQuery" value="" id="input-box">
<input id="page" type="hidden" name="page">
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
</form>

But umbraco search (installed through the package repo) only seems to function if the form is submitted with.

<input type="submit" name="umbSearchResult_6$Button2" value="Search" id="umbSearchResult_6_Button2" class="searchButton" />

If i use <input type="image" .. > to submit then i receive no error message or search results.

Any suggestions on getting search to function with <input type="image" .. > is greatly appreciated. An explanation as to why it doesn't work would be interesting.
apt-get
Posted: Thursday, January 10, 2008 3:41:09 AM
Rank: Newbie

Joined: 10/30/2007
Posts: 5
need to add a hidden field

<input type="hidden" name="umbSearchResult_6$Button2" value="Search" />

to the search form.

why you cant just pass a string fsck only knows.
apt-get
Posted: Wednesday, January 16, 2008 5:52:06 AM
Rank: Newbie

Joined: 10/30/2007
Posts: 5
you can just throw a string at /search.aspx, just call the text form field "search"

wasted hours and hours try to figure this out. the above solution fails as the 6 in "umbSearchResult_6$Button2" will change.

why cant this just go in a readme.txt file in the package zip? in the end i found the "search" string in the umbraco utilities source code... viva la open source!

http://www.codeplex.com/umbracoext/SourceControl/FileView.aspx?itemId=58367&changeSetId=14916

Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.