View Complete Thread | FoxWeb Forum Home
Date:    Msg ID:   
From:    Thread:   

I have an application that I need to display an HTML form and retrieve data as usual.  However, I have a requirement that when a user enters information in a certain field I need to check a Foxpro table to see if the record exsists or not.  If the record exsists I need to populate some of the HTML form fields so the user does not have to enter this information.

I may be missing something here, but why not just place the name of the current script into the form action clause, and place the validation you wish to check *before* the HTML form object code?  That way, pressing the enter key to exit the field will have the same effect as pressing the submit button, but the form will 'loop-back' on itself and perform any validation you like with the posted data before refreshing the web page.  If the required record is found, you can display data from the record, or take appropriate action (nothing, perhaps) if the record is not found.