Hello all.
Sorry if the intro is long, but please read. I'd like to get some feedback from you all![[smile] [smile] [smile]](/data/assets/smilies/smile.gif)
I've been developing web input forms lately, and one of the requests I got from a user is to make it "seem" like an access form, where once data is inputted into a field, the data is saved, without having to click some kind of submit or update button.
I've developed this idea, and I wanted to see if the masses would like to poke some holes in it to see if it is a sound way to go:
Each forms page contains all the scripting necessary to pull information from a database and populate the fields, (no suprise here) as well as functionality to update after a form submit, etc.
In my application, I have several "tabs" of information set up in similar fasion to the tab control in Access or Windows GUI dialog boxes.
Here's what I do to simulate saving data:
I have each forms page's body onUnLoad event trigger a bit of javascript. This script will, in turn, change the action of the form, the target of the form, and any querystring data needed for control, then submit the form.
I point the action to an "invisible" IFRAME (which the target option in the form has no problem finding), and process all of the changes on the form.
Then, this allows the user to click through the tabs via whatever navigation I provide, and all changes are saved in the background via this other frame.
What I don't know how to do:
if the user closes the window, the IFRAME also closes, causing the onUnLoad event to open a new window (if the target frame doesn't exist, a new window will be opened). How would I tell if the user closed the window or simply clicked a tab? I don't want to put any code in my navigation so that I keep this whole process as "black box" as possible, making the idea protable and easily updatable.
Earnie Eng
Sorry if the intro is long, but please read. I'd like to get some feedback from you all
![[smile] [smile] [smile]](/data/assets/smilies/smile.gif)
I've been developing web input forms lately, and one of the requests I got from a user is to make it "seem" like an access form, where once data is inputted into a field, the data is saved, without having to click some kind of submit or update button.
I've developed this idea, and I wanted to see if the masses would like to poke some holes in it to see if it is a sound way to go:
Each forms page contains all the scripting necessary to pull information from a database and populate the fields, (no suprise here) as well as functionality to update after a form submit, etc.
In my application, I have several "tabs" of information set up in similar fasion to the tab control in Access or Windows GUI dialog boxes.
Here's what I do to simulate saving data:
I have each forms page's body onUnLoad event trigger a bit of javascript. This script will, in turn, change the action of the form, the target of the form, and any querystring data needed for control, then submit the form.
I point the action to an "invisible" IFRAME (which the target option in the form has no problem finding), and process all of the changes on the form.
Then, this allows the user to click through the tabs via whatever navigation I provide, and all changes are saved in the background via this other frame.
What I don't know how to do:
if the user closes the window, the IFRAME also closes, causing the onUnLoad event to open a new window (if the target frame doesn't exist, a new window will be opened). How would I tell if the user closed the window or simply clicked a tab? I don't want to put any code in my navigation so that I keep this whole process as "black box" as possible, making the idea protable and easily updatable.
Earnie Eng