Making forms auto refesh
Posted: Thu Jun 25, 2009 5:16 pm
Some of my forms are looking at real-time data. Currently my hand-crafted forms use the meta tag "refresh" (<meta http-equiv="refresh" content="600">) to do this.
I don't think there an easy way of doing this in NuBuilder as it stands.
If I had the time I would add an "Auto Refesh" tick box option along with a "Time (secs)" dialogue box to the form editor. As web pages are generated on-the-fly then, if this was a formal feature, it would probably be best addressed as form options stored in the database. This is not a trivial change though so probably not acceptable at this time.
The best workable solution I have come up with is to use special form names (eg temperatures-autoxxx where xxx is the number of seconds for refresh) for those that require auto refresh. The PHP then needs to be changed to recognize the form name and inject the meta tags where appropriate. It's beauty is it doesn't need a database change and the principle could be extended to other features.
All I have to do is find the PHP and Javascript that starts the page generation. Any clues as to where to start looking?
Regards
David
I don't think there an easy way of doing this in NuBuilder as it stands.
If I had the time I would add an "Auto Refesh" tick box option along with a "Time (secs)" dialogue box to the form editor. As web pages are generated on-the-fly then, if this was a formal feature, it would probably be best addressed as form options stored in the database. This is not a trivial change though so probably not acceptable at this time.
The best workable solution I have come up with is to use special form names (eg temperatures-autoxxx where xxx is the number of seconds for refresh) for those that require auto refresh. The PHP then needs to be changed to recognize the form name and inject the meta tags where appropriate. It's beauty is it doesn't need a database change and the principle could be extended to other features.
All I have to do is find the PHP and Javascript that starts the page generation. Any clues as to where to start looking?
Regards
David