Solved

On Change Event

Posted on 2004-03-24
6
170 Views
Last Modified: 2013-12-24
I have a form displaying several fields from a CFQuery.  The user needs the ability to edit the field.  Once the user has completed their edits and clicked outside the field text-box, I want the record to be updated on the database...  is there a OnChange event that can do this in ColdFusion?  If so do you have an example???
0
Comment
Question by:jdoub
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 Comments
 
LVL 17

Accepted Solution

by:
Tacobell777 earned 25 total points
ID: 10673232
This is a trciky one, and I dont think you would want to do it this way.
Anyway, you could do

<input type="text" name="blah" onBlur="document.yourFormName.submit();">
0
 
LVL 17

Expert Comment

by:anandkp
ID: 10675484
I wld not recommend this logic

Its better u use a submit button for this - so user knows that if incase he mistypes something he can always go back to it & edit it - without having to bother abt it being submitted "onBlur".

Just A Thought !

but if u want to go ahead with it - u already have the answere above.
0
 
LVL 17

Expert Comment

by:Tacobell777
ID: 10675586
Thats exactly what I said, and I quote "and I dont think you would want to do it this way"
0
 

Assisted Solution

by:tnunamak
tnunamak earned 25 total points
ID: 10934119
OnChange is a JAVASCRIPT event, which is client side.  CF is server side.  The only way you'll be able to use OnChange is to force a submit to the web server (either a hidden frame/ popup window or just a plain form submission).  The browser paradigmn is well established and users are trained to look for buttons to click on.  I would put a submit button on the page and use the browser like most users are used to using it.
0

Featured Post

Building an interactive eFuture classroom

Watch and learn how ATEN provided a total control system solution including seamless switching matrix switch, HDBaseT extenders, PDU, lighting control to build an interactive eFuture classroom.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question