I simply prefer onblur for text inputs, and usually use onchange for select inputs.
as far as case goes... i usually stress lowercase due to XHTML validity. You might not be worried about it now, but eventually, you (likely) will be. learning good XHTML habits now will only help down the road. onblur/onchange/etc are XHTML valid. onBlur/onChange/etc are not. charlie ----- Original Message ----- From: "Jerry Johnson" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, August 11, 2003 1:41 PM Subject: RE: Quick CF/Javascript ? > Simple definitions (stolen from http://tech.irt.org/articles/js058/) > > onBlur - form element loses focus or when a window or frame loses focus. > onChange - select, text, or textarea field loses focus and its value has been modified. > > onBlur happens whenever you leave the field to do anything else (whether it changed or not) > > Jerry Johnson > > >>> [EMAIL PROTECTED] 08/11/03 04:27PM >>> > I have case fixed...why onBlur instead? It worked perfectly though! > > Thanks! > > > Regards, > > Eric > > -----Original Message----- > From: Jerry Johnson [mailto:[EMAIL PROTECTED] > Sent: Monday, August 11, 2003 3:20 PM > To: CF-Talk > > onChange, not onchange. > > Case is important. > > Jerry Johnson > > >>> [EMAIL PROTECTED] 08/11/03 04:06PM >>> > Wanna hear something crazy? > > It works if I do the onSelect handler..onChange does nothing, and it has to > be on change since they may edit the number. What in the world? > > > Regards, > > Eric > > -----Original Message----- > From: Charlie Griefer [mailto:[EMAIL PROTECTED] > Sent: Monday, August 11, 2003 2:34 PM > To: CF-Talk > > Hi Eric: > > give this a try: > > <input type="text" name="d_price#nextc#" size="6" maxlength="6" value="0.00" > onchange="updatetotal(this.value);" /> > > function updatetotal(n) { > newtotal = newtotal + n; > } > > you may need to do a parseFloat() around the n if you have problems with the > values concatenating instead of adding. > > hth, > charlie > > ----- Original Message ----- > From: <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Monday, August 11, 2003 12:06 PM > Subject: Quick CF/Javascript ? > > > > This is probably real easy...just need to update via javascript the > > total > of > > the form when a field is changed...here's what I have in the looping > > for > the > > fields... > > > > <td class="MainContent" align="center" width="100"><!---Price > Override----> > > <input type=text name="d_price#nextc#" size=6 > > maxlength=6 value="0.00" onChange="updatetotal(this);"></td> > > > > And the javascript...have to use some kind of "this" function to get > > it to update correctly??? > > > > function updatetotal() { > > newtotal = newtotal + this > > > > } > > > > TIA!! > > > > Regards, > > > > Eric J. Hoffman > > Technology Tamer > > DataStream Connexion > > www.datastreamconnexion.com > > > > > > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 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 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4