Gossamer Forum
Home : Products : DBMan : Customization :

ERROR - Unknown Action

Quote Reply
ERROR - Unknown Action
I have a search form with just a single text field and a submit button. The form's action goes to DB.CGI.

When I enter a text field and click the submit button, the form takes me to VIEW_RECORDS and DBMan works.

HOWEVER, if I hit the enter key in the text field, instead of the browser giving me an error tone, it executes the submit function but without passing &view_records to DBMan.

I dunno if this is a DBMan issue or whether my browser is crapping out. I'm using NS4.50.

Please help before I take to drugs.

Thanks ... Sam
Quote Reply
Re: ERROR - Unknown Action In reply to
It's more a browser issue. On your form you have:

<input type=submit name=view_records value="Search!">

or something similiar. Browsers only send the view_records=Search! info if a user clicks on the button. Since the user hits return, that info is never sent, so DBMan doesn't know what to do.

The solution? Just add a hidden tag:

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

to the form.

Cheers,

Alex
Quote Reply
Re: ERROR - Unknown Action In reply to
Alex .... THANK YOU!

I dunno if that would have ever occurred to me. I looked at other scripts (not DBMan) which beep at me when I hit the "enter" key from a text field and could not learn from their coding.

I then went to your search form (VIEW_SEARCH) and couldn't see anything unusual in the coding, YET it beeps when the user (me) hits "enter" in a text field. Do you recall what is special about your form which causes the beep? I believe the browser is doing it because it happens instantly.

Anyway, the bottom line is you got me working and I certainly appreciate that. It would be a bonus to understand why your form doesn't try to submit its data to db.cgi when "enter" is pressed in a text field.

Thanks again .... Sam