Newbies hlc Posted October 4, 2004 Newbies Posted October 4, 2004 Hi. Is there any way of getting onBlur and onFocus type functionality with FM objects in a layout? I want to run a script to check the contents of a text box field when it becomes deselected and then set the contents of another field accordingly. By the same token, can selecting a text box field trigger an event. thanks a lot....
QuinTech Posted October 4, 2004 Posted October 4, 2004 Hi, hlc, and welcome to FM Forums! This is a, sort of, controversial function for FM. There are a few plugins available that allow you to trigger a script when the contents of a field are changed. (Note that we're already off your question, as there is (AFAIK) no way to trigger a script from a field losing focus if its contents have NOT been changed. Anyways...) So let's say you have this plugin and are aware that you need to change the contents of this field in order to trigger the script. And let's say the script you choose to run changes the contents of the field to "YOU ARE A WINNER!" Now, let's say that the user event that changes onFocus to False is a Go To Next Record command; FM detects that the field in record 1 has been changed, thus triggering the script, but by the time the script is triggered, you're on record 2 and have thus inserted the text from the script into the wrong record. Long story short: It can be done, but it is fraught with peril. You have to have very good scripts to make it work. If you can accept this, one of the plugins that will enable you to do this is ScriptIt from CNS Plug-Ins. There is another available, i think on the FM7 installation disc, in fact, but i can't remember its name. HTH, Jerry
Recommended Posts
This topic is 7617 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