RE: Save form data before submit

2002-10-02 Thread Robert Segal

To save the information to a database you would need to submit a cfm page.
On way to do this is with a hidden frame.  The onChange event from a form
field in a visible frame could populate a field in a hidden frame and then
submit that page in the hidden frame (which would write the information to a
database, a session variable, or whatever).  I've never done this but there
is no reason it shouldn't work.

-Original Message-
From: Ryan Kime [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, October 02, 2002 10:07 AM
To: CF-Talk
Subject: RE: Save form data before submit


Something like this? I am using this in a contact form page.



function getperson() {

if (document.Form1.Products.value=="GI") {
document.Form1.sendto.value="[EMAIL PROTECTED]" } if
(document.Form1.Products.value=="HE") {
document.Form1.sendto.value="[EMAIL PROTECTED]" } if
(document.Form1.Products.value=="SP") {
document.Form1.sendto.value="[EMAIL PROTECTED]" } if
(document.Form1.Products.value=="BP") {
document.Form1.sendto.value="[EMAIL PROTECTED]" } if
(document.Form1.Products.value=="MP") {
document.Form1.sendto.value="[EMAIL PROTECTED]" } if
(document.Form1.Products.value=="TS") {
document.Form1.sendto.value="[EMAIL PROTECTED]" } if
(document.Form1.Products.value=="IR") {
document.Form1.sendto.value="[EMAIL PROTECTED]" } if
(document.Form1.Products.value=="HR") {
document.Form1.sendto.value="[EMAIL PROTECTED]" } if
(document.Form1.Products.value=="SU") {
document.Form1.sendto.value="[EMAIL PROTECTED]" }

}


The sendto field is hidden. And the function is called using an OnChange
event from a dropbox.


-Original Message-
From: Tony Weeg [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, October 01, 2002 8:07 PM
To: CF-Talk
Subject: RE: Save form data before submit


oh please oh please.that would rock.

i hope someone who knows replies to this...this would
be very coolor, what about sending the data
to a session variable onBlur :)

that would be even nicer!!

tw


-Original Message-
From: Paul Campano [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, October 01, 2002 9:30 PM
To: CF-Talk
Subject: Save form data before submit


Is there a way I can save the data from a form field BEFORE the submit
button is pressed?  I thought I saw something awhile back that used
javascript to save each line to a db onBlur  ?  Has anyone done this or have
an idea on how it can be done?  Thanks.

Paul Campano





~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com



RE: Save form data before submit

2002-10-02 Thread Ryan Kime

Something like this? I am using this in a contact form page.



function getperson() {

if (document.Form1.Products.value=="GI") {
document.Form1.sendto.value="[EMAIL PROTECTED]" }
if (document.Form1.Products.value=="HE") {
document.Form1.sendto.value="[EMAIL PROTECTED]" }
if (document.Form1.Products.value=="SP") {
document.Form1.sendto.value="[EMAIL PROTECTED]" }
if (document.Form1.Products.value=="BP") {
document.Form1.sendto.value="[EMAIL PROTECTED]" }
if (document.Form1.Products.value=="MP") {
document.Form1.sendto.value="[EMAIL PROTECTED]" }
if (document.Form1.Products.value=="TS") {
document.Form1.sendto.value="[EMAIL PROTECTED]" }
if (document.Form1.Products.value=="IR") {
document.Form1.sendto.value="[EMAIL PROTECTED]" }
if (document.Form1.Products.value=="HR") {
document.Form1.sendto.value="[EMAIL PROTECTED]" }
if (document.Form1.Products.value=="SU") {
document.Form1.sendto.value="[EMAIL PROTECTED]" }

}


The sendto field is hidden. And the function is called using an OnChange
event from a dropbox.


-Original Message-
From: Tony Weeg [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, October 01, 2002 8:07 PM
To: CF-Talk
Subject: RE: Save form data before submit


oh please oh please.that would rock.

i hope someone who knows replies to this...this would
be very coolor, what about sending the data
to a session variable onBlur :)

that would be even nicer!!

tw


-Original Message-
From: Paul Campano [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, October 01, 2002 9:30 PM
To: CF-Talk
Subject: Save form data before submit


Is there a way I can save the data from a form field BEFORE the submit
button is pressed?  I thought I saw something awhile back that used
javascript to save each line to a db onBlur  ?  Has anyone done this or have
an idea on how it can be done?  Thanks.

Paul Campano




~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com



RE: Save form data before submit

2002-10-01 Thread Jared Clinton

Paul,

You could also consider a more 'low-tech' solution.

Store the form values in cookies manipulated entirely client side using javascript.

That way you dont need any server side code.

Regards, 
Jared Clinton.

-Original Message-
From: Jared Clinton 
Sent: Wednesday, 2 October 2002 11:08 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Save form data before submit


It would be possible to change the src of an  to 
'http://yourserver/tempsave.cfm?formdata1=1&formdata2=2&blah=blah&blahblah=blahblah'

The cfm page could return an image using cfcontent after saving your input parameters 
as appropriate.

The event which changes the images source would have to be logical though, you 
wouldn't want to do it every time a form element changed a value. Possibly a time 
interval?

Just an idea.

Regards, Jared Clinton.

-Original Message-
From: Tony Weeg [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 2 October 2002 11:07 AM
To: CF-Talk
Subject: RE: Save form data before submit


oh please oh please.that would rock.

i hope someone who knows replies to this...this would
be very coolor, what about sending the data
to a session variable onBlur :)

that would be even nicer!!

tw


-Original Message-
From: Paul Campano [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, October 01, 2002 9:30 PM
To: CF-Talk
Subject: Save form data before submit


Is there a way I can save the data from a form field BEFORE the submit
button is pressed?  I thought I saw something awhile back that used
javascript to
save each line to a db onBlur  ?  Has anyone done this or have an idea
on how it can be done?  Thanks.

Paul Campano




~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm



Re: Save form data before submit

2002-10-01 Thread Critter

oi Paul!!

are you trying to save the information a person has entered into the fields?? to put 
into a database
or something??



-- 
Critz
 Macromedia Certified Advanced ColdFusion Developer
 http://blog.ctzc.com";>





Tuesday, October 1, 2002, 9:29:55 PM, you wrote:

PC> Is there a way I can save the data from a form field BEFORE the submit button is 
pressed?  I thought I saw something awhile back that used javascript to
PC> save each line to a db onBlur  ?  Has anyone done this or have an idea on how it 
can be done?  Thanks.

PC> Paul Campano


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm



RE: Save form data before submit

2002-10-01 Thread Tim Painter

This would be fairly easy to do -- create a hidden frame and set an onBlur
or onChange event to change the location of the hidden frame to a .cfm page
that processes the request.

e.g





Then have the processpage.cfm do what you need it to do

Tim P.

-Original Message-
From: Paul Campano [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 01, 2002 9:30 PM
To: CF-Talk
Subject: Save form data before submit


Is there a way I can save the data from a form field BEFORE the submit
button is pressed?  I thought I saw something awhile back that used
javascript to
save each line to a db onBlur  ?  Has anyone done this or have an idea on
how it can be done?  Thanks.

Paul Campano




~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm



RE: Save form data before submit

2002-10-01 Thread Jared Clinton

It would be possible to change the src of an  to 
'http://yourserver/tempsave.cfm?formdata1=1&formdata2=2&blah=blah&blahblah=blahblah'

The cfm page could return an image using cfcontent after saving your input parameters 
as appropriate.

The event which changes the images source would have to be logical though, you 
wouldn't want to do it every time a form element changed a value. Possibly a time 
interval?

Just an idea.

Regards, Jared Clinton.

-Original Message-
From: Tony Weeg [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 2 October 2002 11:07 AM
To: CF-Talk
Subject: RE: Save form data before submit


oh please oh please.that would rock.

i hope someone who knows replies to this...this would
be very coolor, what about sending the data
to a session variable onBlur :)

that would be even nicer!!

tw


-Original Message-
From: Paul Campano [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, October 01, 2002 9:30 PM
To: CF-Talk
Subject: Save form data before submit


Is there a way I can save the data from a form field BEFORE the submit
button is pressed?  I thought I saw something awhile back that used
javascript to
save each line to a db onBlur  ?  Has anyone done this or have an idea
on how it can be done?  Thanks.

Paul Campano




~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.



Re: Save form data before submit

2002-10-01 Thread jon hall

This is one of those things I've always wanted to do, but never get a
chance to...
Basically this is how I would do it.


function getObject(nameStr) {
var ns4 = document.layers ? true : false;
var ie = document.all? true : false;
var dom = document.getElementById && !document.all ? true : false;
if (dom) {  return document.getElementById(nameStr); }
if (ie) { return document.all[nameStr]; }
if (ns4) { return document.images[nameStr]; }
}

var dataPipe = getObject('imgDataPipe');

function saveData(fObj) {
  field_name = fObj.name;
  field_value = fObj.value;
  dataPipe.src = "saveFormData.cfm?saveField=" + field_name +
  "&value=" + field_value;
}








saveFormdata.cfm:

  



Typed that as I went, so it probably has a few problems. Should get
you started though. I'll probably reference this post when I actually
get to creating a real onblur save library for myself...so thanks :)

-- 
 jon
 mailto:[EMAIL PROTECTED]

Tuesday, October 1, 2002, 9:29:55 PM, you wrote:
PC> Is there a way I can save the data from a form field BEFORE the submit button is 
pressed?  I thought I saw something awhile back that used javascript to
PC> save each line to a db onBlur  ?  Has anyone done this or have an idea on how it 
can be done?  Thanks.

PC> Paul Campano

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm



RE: Save form data before submit

2002-10-01 Thread Tony Weeg

good ideasits funny, almost everytime i am working on a new
bit of code for a client, and i run into something cool i want to
try, and i search google, and find nothing, i just open my email
and WHAM, there is someone else on THE LIST OF ALL LISTS, who is
trying to do the samethanks for the ideamaybe some more
will be coming... :)

tw

-Original Message-
From: Sicular, Alexander [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, October 01, 2002 9:14 PM
To: CF-Talk
Subject: RE: Save form data before submit


that could easily be done. just set up a hidden form field and pass
values to it after onblur() or any other event you chose.. or have a
window pop up and close itself after submit(). you can do almost
anything in javascript. the only thing i take it you don't want to do is
refresh the page, otherwise you could even do that.

gl,
alex

-Original Message-
From: Tony Weeg [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 01, 2002 9:07 PM
To: CF-Talk
Subject: RE: Save form data before submit


oh please oh please.that would rock.

i hope someone who knows replies to this...this would
be very coolor, what about sending the data
to a session variable onBlur :)

that would be even nicer!!

tw


-Original Message-
From: Paul Campano [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, October 01, 2002 9:30 PM
To: CF-Talk
Subject: Save form data before submit


Is there a way I can save the data from a form field BEFORE the submit
button is pressed?  I thought I saw something awhile back that used
javascript to
save each line to a db onBlur  ?  Has anyone done this or have an idea
on how it can be done?  Thanks.

Paul Campano





~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm



RE: Save form data before submit

2002-10-01 Thread Sicular, Alexander

that could easily be done. just set up a hidden form field and pass values to it after 
onblur() or any other event you chose.. or have a window pop up and close itself after 
submit(). you can do almost anything in javascript. the only thing i take it you don't 
want to do is refresh the page, otherwise you could even do that.

gl,
alex

-Original Message-
From: Tony Weeg [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 01, 2002 9:07 PM
To: CF-Talk
Subject: RE: Save form data before submit


oh please oh please.that would rock.

i hope someone who knows replies to this...this would
be very coolor, what about sending the data
to a session variable onBlur :)

that would be even nicer!!

tw


-Original Message-
From: Paul Campano [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, October 01, 2002 9:30 PM
To: CF-Talk
Subject: Save form data before submit


Is there a way I can save the data from a form field BEFORE the submit
button is pressed?  I thought I saw something awhile back that used
javascript to
save each line to a db onBlur  ?  Has anyone done this or have an idea
on how it can be done?  Thanks.

Paul Campano




~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.



RE: Save form data before submit

2002-10-01 Thread Tony Weeg

oh please oh please.that would rock.

i hope someone who knows replies to this...this would
be very coolor, what about sending the data
to a session variable onBlur :)

that would be even nicer!!

tw


-Original Message-
From: Paul Campano [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, October 01, 2002 9:30 PM
To: CF-Talk
Subject: Save form data before submit


Is there a way I can save the data from a form field BEFORE the submit
button is pressed?  I thought I saw something awhile back that used
javascript to
save each line to a db onBlur  ?  Has anyone done this or have an idea
on how it can be done?  Thanks.

Paul Campano



~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm