Gossamer Forum
Home : Products : DBMan : Installation :

Search problem

Quote Reply
Search problem
Hey all.

I'm attempting to create a custom search form but am having a weird problem. When hitting the return key it ignores the "name" argument in the submit button, and causes the browser to leave off "&view_records=search" which comes at the end of a valid search.

For example, when pressing the return key on the keyboard it will try to access:
/cgi-bin/db/db.cgi?db=default&uid=default&ID=3& instead of
/cgi-bin/db/db.cgi?db=default&uid=default&ID=3&view_records=search

... and DBMan spits back the "Unknown Action" error. I know this is a problem with the form but I've tried close to <b>everything</b> to change it -- even resorted to using some java to force the user to click on the button instead of pressing return, but it turns out after one access to db.cgi that java dies and the browser will allow the user to hit return again. Anyone see something wrong with this:



<form name="view_records" action="/cgi-bin/db/db.cgi" method="GET" target="bottomleft">

<input type=hidden name="db" value="default">
<input type=hidden name="uid" value="default">

<input type="text" name="ID" size=5 maxlength=5 style="BACKGROUND: #ffffff; COLOR: black; CURSOR: default; FONT-FAMILY: verdana,arial,helvetica; FONT-SIZE: xx-small; FONT-WEIGHT: default">

<input name="view_records" type="submit" value="search" style="BACKGROUND: #eeeeee; COLOR: black; CURSOR: hand; FONT-FAMILY: verdana,arial,helvetica; FONT-SIZE: xx-small; FONT-WEIGHT: bold">

</form>


Quote Reply
Re: Search problem In reply to
You need to add:

Code:

<input type="hidden" name="view_records" value="1">



Regards,

Eliot

Quote Reply
Re: Search problem In reply to
It looks like perhaps your call to the script may need to be adjusted. You have:

<form name="view_records" action="/cgi-bin/db/db.cgi" method="GET" target="bottomleft">

And it should be similiar to:

<FORM ACTION="$db_script_url" METHOD="GET">
<input type=hidden name="view_records" value="1">

There are search form samples available in the FAQ noted below if this does not provide your solution.

Hope this helps

Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
Quote Reply
Re: Search problem In reply to
Sorry for the repeat question and thank you for replying.