faheemhameed Posted July 1, 2002 Posted July 1, 2002 Hi there, I have just created a simple search, list and form. The search form has a few input fields and a preset hidden field. the format file is List.html the error file is Search.html which is the search form as well. Everything works fine. I can do a find and goto the list and form. The problem occurs when the database failed to return any records and it redirects to the search form again (I display a red color text showing there was no records found) . Then I tried to enter some other texts for the search. It gave me the following error: [color:"red"] Command is invalid: Unable to to process your because the server encountered and invalid command. Please correct your request and try again. Please shed some lights on my issue. Thanks a lot, Hameed Hong Kong
Garry Claridge Posted July 1, 2002 Posted July 1, 2002 I guess we would need to see some of your 'Search.html' to see what is happening. All the best. Garry
faheemhameed Posted July 2, 2002 Author Posted July 2, 2002 Hi, I have attached my search.html here please have look. Hameed Search.txt
Garry Claridge Posted July 2, 2002 Posted July 2, 2002 I wonder if this line: <input type="hidden" name="-max" value="[FMP-Field:g_Max_Show_Record_List]"> Causes a problem when submitted after an error because it may not have been replaced! Does the Valuelist have entries when the page has been returned after an error? All the best. Garry
faheemhameed Posted July 3, 2002 Author Posted July 3, 2002 Yes it can show the value list perfectly after it returned a no records error. Yes your clue is right. After the db returned no records this tags <input type="hidden" name="-max" value="[FMP-Field:g_Max_Show_Record_List]"> becomes <input type="hidden" name="-max" value=""> (obviously there is an invalid command) [FMP-Field:g_Max_Show_Record_List] is a global field. I assumed that the global field shows up even the db returned no records. If I change my above tag to <input type="hidden" name="-max" value="5"> something like this everything works fine. Any idea why the global field is not showing up?? Many thanks Hameed
Garry Claridge Posted July 3, 2002 Posted July 3, 2002 As a workaround, you may want to assign the -max value to a Token. Then test if an error condition exists with [FMP-If] tags. All the best. Garry
Keith M. Davie Posted July 3, 2002 Posted July 3, 2002 Hameed writes, >Yes it can show the value list perfectly after it returned a no records error. >Yes your clue is right. After the db returned no records this tags ... >Any idea why the global field is not showing up?? I've recently experimented with the fmp-includefield tag, which prefers a global. Seeing your question I went to this test folder and ran a -find which returned error 401 on the error.htm. Also on the error.htm was the tag to display the global field. Needless to say, that global was not displayed. When I looked at the db file, I could clearly see the global field. However, because the status bar revealed "Found: 0", it was obvious that there was no record from which the cdml tag could access the data.
faheemhameed Posted July 4, 2002 Author Posted July 4, 2002 Thanks Keith & Garry for your advice. I would hard code the max no of records within the HTML to solve this issue. That's fine for me now. Thank you all again for your assistance. Hameed
Recommended Posts
This topic is 8247 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now