ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 19th, 2005, 03:39 PM
FALCONSEYE FALCONSEYE is offline
Permanently Banned
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 377 FALCONSEYE Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 1 Day 16 h 57 m 14 sec
Warnings Level: 15
Number of bans: 1
Reputation Power: 0
Question is this possible ?

i am trying to capture the value of a textfield with

<body onUnload="getVal()">

is there a way to write the value of
<input type="text" name="textfield">

if the user closes the window or hits the back button on the browser menu ?
this would trigger getVal() function, somewhere in the

<script ..>
function getVal()
{
write to the db table
}
</script>

thanks for the help in advance

Reply With Quote
  #2  
Old July 19th, 2005, 03:45 PM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,689 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 16 h 33 m 51 sec
Reputation Power: 53
You should ask this in the Javascript forum.

And I'm not sure what you're asking in that last part....there is no way to write to a database from standard Javascript. You MIGHT be able to do it with something like AJAX but again, these are all Javascript questions.
Comments on this post
FALCONSEYE agrees!
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian.
How to Post a Question in the Forums

Reply With Quote
  #3  
Old July 19th, 2005, 04:00 PM
FALCONSEYE FALCONSEYE is offline
Permanently Banned
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 377 FALCONSEYE Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 1 Day 16 h 57 m 14 sec
Warnings Level: 15
Number of bans: 1
Reputation Power: 0
how about using <cfwddx> tag? i remember doing something like this before but i forgot how i did it.
is there someway to serialize the form data and pass it to another cfm page where i can create a db record then close all the windows ?

Reply With Quote
  #4  
Old July 19th, 2005, 05:09 PM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,689 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 16 h 33 m 51 sec
Reputation Power: 53
Still not sure I follow. Why not just post the form and then you can do anything you like. If the idea is to take the form data and do something with it on the server without doing a form post, then the only two ways you can do this (with any application server) are to use Javascript to pass the data to a hidden frame or to use AJAX to execute an HTTP call within the Javascript itself.

Reply With Quote
  #5  
Old July 19th, 2005, 07:41 PM
FALCONSEYE FALCONSEYE is offline
Permanently Banned
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 377 FALCONSEYE Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 1 Day 16 h 57 m 14 sec
Warnings Level: 15
Number of bans: 1
Reputation Power: 0
could you explain what AJAX is? is this the football team from the Netherlands?

by the way, they want the record the customer information if the customer closes the order form, or hits go back or goes to another url. so, anything s/he enters until that point they want to capture it.
i thought i could do it with WDDX but didn't happen. i did send the form to another page where i did my insert and then send it back to the opener. but this is handled by a pop-up. they dont want any pop-ups.

:P is there anyway of doing this?
thanks for the help in advance

Reply With Quote
  #6  
Old July 19th, 2005, 08:29 PM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,689 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 16 h 33 m 51 sec
Reputation Power: 53
What they are asking for is not feasible using a web browser. The user has total control of what they do, and that includes closing the browser and pressing the back button. Now again, you can try to build an AJAX system (asynchronous Javascript and XML) that fires HTTP requests to the server in response to browser events using the XMLHTTPRequest() Javascript method. However, it is not very good practice to break the users expectations of what will happen when they perform certain browser activities. Also, the user can disable Javascript which will nullify all your hard work. And finally, AJAX is quite complex and is only supported by newer browsers. However, if you still want to give it a try you can Google AJAX. Also, here is a site by a developer who has done some integration between AJAX and ColdFusion:

http://www.indiankey.com/cfajax/

Reply With Quote
  #7  
Old July 20th, 2005, 11:47 AM
FALCONSEYE FALCONSEYE is offline
Permanently Banned
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 377 FALCONSEYE Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 1 Day 16 h 57 m 14 sec
Warnings Level: 15
Number of bans: 1
Reputation Power: 0
wow, i did it with AJAX and XMLHTTPRequest()
it's sooo cool
thanks for the heads up

Reply With Quote
  #8  
Old July 20th, 2005, 11:53 AM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,689 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 16 h 33 m 51 sec
Reputation Power: 53
Any time!

Reply With Quote
  #9  
Old July 21st, 2005, 09:05 AM
tac's Avatar
tac tac is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 187 tac User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 h 10 m 5 sec
Reputation Power: 6
Just a headsup, gmail used XMLHTTPRequest() and it was not supported by many browsers, therefor they had to create another version of gmail that is less demanding, but if you all of your customers just have the newest version of Internet Explorer, I suppose that is fine.

I really don't like the idea of stealing customer information, that they do not want to provide it if they are clearly attempting to cancel the transaction.

Could your unethical practices be why you have 10 warnings, and 1 ban?

Last edited by tac : July 21st, 2005 at 09:07 AM.

Reply With Quote
  #10  
Old July 21st, 2005, 10:15 AM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,689 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 16 h 33 m 51 sec
Reputation Power: 53
Agreed that this can get into the grey area, but for something like an Intranet where you know the users are on IE, Firefox, or Safari, and you are doing this for some estabilished business reason, this approach might be fine. However, if you're doing this to anonymous public users then you can probably expect a backlash or a decrease in the use of your site.

Reply With Quote
  #11  
Old July 21st, 2005, 01:55 PM
FALCONSEYE FALCONSEYE is offline
Permanently Banned
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 377 FALCONSEYE Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 1 Day 16 h 57 m 14 sec
Warnings Level: 15
Number of bans: 1
Reputation Power: 0
Quote:
Originally Posted by tac
Just a headsup, gmail used XMLHTTPRequest() and it was not supported by many browsers, therefor they had to create another version of gmail that is less demanding, but if you all of your customers just have the newest version of Internet Explorer, I suppose that is fine.

I really don't like the idea of stealing customer information, that they do not want to provide it if they are clearly attempting to cancel the transaction.

Could your unethical practices be why you have 10 warnings, and 1 ban?


This application is not designed to "STEAL" customer information. Furthermore, "unethical practices be why you have 10 warnings, and 1 ban?" is none of your business. I got those because i simply told people what i really thought about the sites they posted on the web site crituque forum.
If you don't have anything to say about my original post, keep your stupid comments to yourself!!!!

Reply With Quote
  #12  
Old July 21st, 2005, 02:41 PM
tac's Avatar
tac tac is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 187 tac User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 h 10 m 5 sec
Reputation Power: 6
Is this what you mean by telling somebody what you really thought of their site, when they asked for a critique? What you said had nothing to do with the person who posted, it was about another person's avatar:

Quote:
Originally Posted by FALCONSEYE
haha. gotta take that pic out penguin! my eyyeeezzzzz. are you saving some for the winter or something ? critique? you want some critique? if you got no time to put some together, at least post something when you do. don't show us some $hittie front page look text filled cr@p! there are tons of them out there. go do your work, till then dont say nuttin
Your Post
Attached Images
File Type: jpg photo.jpg (9.4 KB, 75 views)

Reply With Quote
  #13  
Old July 21st, 2005, 02:43 PM
FALCONSEYE FALCONSEYE is offline
Permanently Banned
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 377 FALCONSEYE Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 1 Day 16 h 57 m 14 sec
Warnings Level: 15
Number of bans: 1
Reputation Power: 0
shut da fu. up

Reply With Quote
  #14  
Old July 21st, 2005, 02:44 PM
FALCONSEYE FALCONSEYE is offline
Permanently Banned
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 377 FALCONSEYE Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 1 Day 16 h 57 m 14 sec
Warnings Level: 15
Number of bans: 1
Reputation Power: 0
if you got no time to put some together, at least post something when you do. don't show us some $hittie front page look text filled cr@p! there are tons of them out there. go do your work, till then dont say nuttin

i know you won't be able to "Comprehend" this part.

Reply With Quote
  #15  
Old July 21st, 2005, 03:40 PM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,689 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 16 h 33 m 51 sec
Reputation Power: 53
Ok guys that's enough. If you want to keep knocking each other take it to private messages please.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > is this possible ?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off