Actually the unLoad JavaScript function will be the decision place and you
can invoke any action that you may want.
If the form has been modified than submit the form to save it and reload the
original form with the database, if not then continue with the original
request.

One intermediary step is to ask the user:
The form has been changed, do you want to save?
and perform the save only if the user wants it and not necessary if they
modified it.
and yes requires that JavaScript is enabled.

I don't see a lot of overhead. Each item that can be changed on your form
needs an associated onChange function  though, that will set the hidden
field.

You may want to check the following link too:
http://www.depressedpress.com/DepressedPress/Content/ColdFusion/Essays/GIFAs
Pipe/


Marius Milosav
www.scorpiosoft.com
It's not about technology, it's about people.
Virtual Company (VICO) Application Demo
www.scorpiosoft.com/vicodemo/login.cfm


----- Original Message -----
From: "Lee Fuller" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Sunday, January 13, 2002 1:24 PM
Subject: RE: Creating Session Var w/Javascript?


> I thought it was that simple.  I'm not a Javascript guru.. But I'll
> figure it out.  I guess my next question would be, if I use an
> "onunload" action for the form, will that negate any action that was
> about to take place?  I.e., if they were about to be sent to another
> location, and this "onunload" script takes over, would that then make
> the page effectively "forget" what it was supposed to have done?
>
>
>
> > -----Original Message-----
> > From: Marius Milosav [mailto:[EMAIL PROTECTED]]
> > Sent: Sunday, January 13, 2002 10:15 AM
> > To: CF-Talk
> > Subject: Re: Creating Session Var w/Javascript?
> >
> >
> > One method is to have a hidden field on the page (default
> > value 0 or no). If the form is modified change the value to 1
> > or yes ... On unload event check the value of the filed and
> > take appropriate action.
> >
> > Marius Milosav
> > www.scorpiosoft.com
> > It's not about technology, it's about people.
> > Virtual Company (VICO) Application Demo
> > www.scorpiosoft.com/vicodemo/login.cfm
> >
> > ----- Original
> > Message -----
> > From: "Lee Fuller" <[EMAIL PROTECTED]>
> > To: "CF-Talk" <[EMAIL PROTECTED]>
> > Sent: Sunday, January 13, 2002 12:57 PM
> > Subject: Creating Session Var w/Javascript?
> >
> >
> > > I believe we've covered this, but couldn't seem to find the
> > answer in
> > > the archives...
> > >
> > > Is there a way, via javascript, to set a session var's value?
> > > Specifically, I would like to have "session.formchanged"
> > set to "yes",
> > > if a change is made to any form field on a form.  Then, when they
> > > attempt to leave the page, it will know to submit the changes.
> > >
> > > Suggestions?
> > >
> > > TTAIA!
> > >
> > >
> >
> 
______________________________________________________________________
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to