Hi,
I'm looking for a method of polling a form and trapping an event when a field is updated. As there isn't a "timer" event in EBase, does anyone have a method of achieving this?
Thanks
Timer event - is there such a thing?
Moderators: Jon, Steve, Ian, Dave
-
- Ebase User
- Posts: 11
- Joined: Thu Sep 13, 2007 8:20 am
- Location: North Herts District Council
- Joost
- Ebase User
- Posts: 49
- Joined: Fri Sep 14, 2007 6:14 pm
- Location: The Netherlands
-
- Ebase User
- Posts: 11
- Joined: Thu Sep 13, 2007 8:20 am
- Location: North Herts District Council
-
- Ebase User
- Posts: 94
- Joined: Fri Sep 14, 2007 12:18 pm
- Location: The Netherlands
- Contact:
Timer event - is there such a thing?
Meta Refresh Tag - Is an HTML construct, normally used in the body tag to automatically refresh a page after a certain amount of time.
Javascript - is a scripting language understood by most browsers that run client side.
Cron Job - is a scheduled task on of the Unix variants (Unix, Linux, BSD, ...)
wget - is a program, initially under the Unix variants but now ported to Windows as well, that downloads a web-page / site.
None of this requires pure Java programming, though Javascript is based on Java.
I have a question for you - are you trying to watch another site or are you wanting to watch your own form as a user is filling it in?
Depending on your answer to this, depends on whether Joost's answer is relevant to your question.
Javascript - is a scripting language understood by most browsers that run client side.
Cron Job - is a scheduled task on of the Unix variants (Unix, Linux, BSD, ...)
wget - is a program, initially under the Unix variants but now ported to Windows as well, that downloads a web-page / site.
None of this requires pure Java programming, though Javascript is based on Java.
I have a question for you - are you trying to watch another site or are you wanting to watch your own form as a user is filling it in?
Depending on your answer to this, depends on whether Joost's answer is relevant to your question.
0 x
-
- Ebase User
- Posts: 11
- Joined: Thu Sep 13, 2007 8:20 am
- Location: North Herts District Council
Hi AJDulk,
Basically what I want to do is use the eform to collect some details from a customer (user) and then save this to a folder. I have a script which polls this folder and process the data in the file and then saves the results to a file. I want the eform to refresh itself after 30sec and see if the result file has arrived. Depending on the content of this result, the eform makes a decision on which route to take for it's conclusion.
Hope this explains my requirement.
Thanks
Basically what I want to do is use the eform to collect some details from a customer (user) and then save this to a folder. I have a script which polls this folder and process the data in the file and then saves the results to a file. I want the eform to refresh itself after 30sec and see if the result file has arrived. Depending on the content of this result, the eform makes a decision on which route to take for it's conclusion.
Hope this explains my requirement.
Thanks
0 x
Indy
-
- Ebase User
- Posts: 94
- Joined: Fri Sep 14, 2007 12:18 pm
- Location: The Netherlands
- Contact:
Timer event - is there such a thing?
The flow as I understand it is:
1. The user fills in a form.
2. The user submits the form.
3. The form writes a file to the file system.
4. The form displays a "please wait" page.
5. Every 30 seconds on the "please wait" page the form checks to see if a new file is created / the existing file is updated with the result.
6. Once the file is updated the form continues depending on the result.
To arrange what you are wanting in the web-browser using an Ebase form, you will need to use JavaScript. You should place the JavaScript in the HTML++ tab found in the "Form properties" (this JavaScript will be available on every page of the form).
On the "please wait" page you need to check for the new / read the old file to see if the result is in. If it is then do a redirect to your next page. On the "please wait" page, there needs to be something to trigger the Timer function in your JavaScript (label or display only text field with html selected in its properties?).
To find the JavaScript use your favourite Search Engine with the terms "JavaScript Timer" (without the quotes will give the most results). Using Google.com, Yahoo.com and Cuil.com give you plenty of examples.
Be aware: There are some users that disable JavaScript in their browsers. This will thwart your functionality. You may want to have a message along the lines of "JavaScript is disabled, please wait 30 seconds and then click the button to see if the results are in" with the corresponding button that appears if JavaScript is disabled.
Regards,
Antony
1. The user fills in a form.
2. The user submits the form.
3. The form writes a file to the file system.
4. The form displays a "please wait" page.
5. Every 30 seconds on the "please wait" page the form checks to see if a new file is created / the existing file is updated with the result.
6. Once the file is updated the form continues depending on the result.
To arrange what you are wanting in the web-browser using an Ebase form, you will need to use JavaScript. You should place the JavaScript in the HTML++ tab found in the "Form properties" (this JavaScript will be available on every page of the form).
On the "please wait" page you need to check for the new / read the old file to see if the result is in. If it is then do a redirect to your next page. On the "please wait" page, there needs to be something to trigger the Timer function in your JavaScript (label or display only text field with html selected in its properties?).
To find the JavaScript use your favourite Search Engine with the terms "JavaScript Timer" (without the quotes will give the most results). Using Google.com, Yahoo.com and Cuil.com give you plenty of examples.
Be aware: There are some users that disable JavaScript in their browsers. This will thwart your functionality. You may want to have a message along the lines of "JavaScript is disabled, please wait 30 seconds and then click the button to see if the results are in" with the corresponding button that appears if JavaScript is disabled.
Regards,
Antony
0 x
-
- Ebase User
- Posts: 11
- Joined: Thu Sep 13, 2007 8:20 am
- Location: North Herts District Council
Hi AJDulk,
Thanks for the pointers...I will certainly do some searches to see what comes up.
I've just had a look at the HTML++ tab and it says in there that any code placed here will be available to all pages. Wouldn't that be a problem for me if it keeps executing the html on every page? Or is there a method of checking which page the user's on and then deciding whether to execute or not (?)
Thanks
Thanks for the pointers...I will certainly do some searches to see what comes up.
I've just had a look at the HTML++ tab and it says in there that any code placed here will be available to all pages. Wouldn't that be a problem for me if it keeps executing the html on every page? Or is there a method of checking which page the user's on and then deciding whether to execute or not (?)
Thanks
0 x
Indy
- Joost
- Ebase User
- Posts: 49
- Joined: Fri Sep 14, 2007 6:14 pm
- Location: The Netherlands
-
- Ebase User
- Posts: 94
- Joined: Fri Sep 14, 2007 12:18 pm
- Location: The Netherlands
- Contact:
Timer event - is there such a thing?
In my last reply I mentioned this already. To quote the relevant parts:
Regards,
Antony
You should place the JavaScript in the HTML++ tab found in the "Form properties" (this JavaScript will be available on every page of the form).
The idea is though the code is available on all pages (within the form) for use, you explicitly activate it on the page(s) where you wish to use it.On the "please wait" page, there needs to be something to trigger the Timer function in your JavaScript (label or display only text field with html selected in its properties?).
Regards,
Antony
0 x
Who is online
Users browsing this forum: No registered users and 106 guests