RE: Onkeypress
Also, you can easily check to see if anything is selected in that box before submission. Just loop through all elements of the select list and if none are selected, produce an error message. Setting the 1st element as selected will remove the need for that check though. -Original Message- From: Kris Pilles [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 01, 2002 9:35 AM To: CF-Talk Subject: RE: Onkeypress I think I need to set the focud of the select list to focus on load... I set the focus but it does not highlight the box? Is there a way to make it highlight an item on the select box onload??? -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 01, 2002 10:31 AM To: CF-Talk Subject: RE: Onkeypress would changing window.event && window.event.keyCode == 13 to window.event == 13 && window.event.keyCode == 13 help at all? Ade -Original Message- From: Kris Pilles [mailto:[EMAIL PROTECTED]] Sent: 01 August 2002 15:28 To: CF-Talk Subject: Onkeypress function entsub() { if (window.event && window.event.keyCode == 13) returninfo(); else return true; } I am using this on a form to allow pressing the enter key to call my function returninfo() However, if the user hits enter and nothing is selected in my select box, I get an error... Any ideas on how I can correct this??? -Original Message- From: Alex Hubner [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 01, 2002 9:25 AM To: CF-Talk Subject: Hack Proofing ColdFusion Hi folks, Does anybody knows where I can find the e-book version of "Hack Proofing ColdFusion" (Greg Meyer, Steven Casco, Sarge, Rob Rusher)? I know that I can find it at Amazon.com but I really avoid shopping there (personal problems in the past)... I'm looking for other places but I only found paper edition, not the eletronic one. Thanks!! Alex __ 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 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
RE: Onkeypress
Yes, in your onload routine, set the focus() for that select box. You could highlight any item in the select list by referencing a specific element of the list. Just to set focus...something like this: var obj = document.forms[0].SEL1; //< my select list obj.options[0].selected=true; //< set first element focus -Original Message- From: Kris Pilles [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 01, 2002 9:35 AM To: CF-Talk Subject: RE: Onkeypress I think I need to set the focud of the select list to focus on load... I set the focus but it does not highlight the box? Is there a way to make it highlight an item on the select box onload??? -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 01, 2002 10:31 AM To: CF-Talk Subject: RE: Onkeypress would changing window.event && window.event.keyCode == 13 to window.event == 13 && window.event.keyCode == 13 help at all? Ade -Original Message- From: Kris Pilles [mailto:[EMAIL PROTECTED]] Sent: 01 August 2002 15:28 To: CF-Talk Subject: Onkeypress function entsub() { if (window.event && window.event.keyCode == 13) returninfo(); else return true; } I am using this on a form to allow pressing the enter key to call my function returninfo() However, if the user hits enter and nothing is selected in my select box, I get an error... Any ideas on how I can correct this??? -Original Message- From: Alex Hubner [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 01, 2002 9:25 AM To: CF-Talk Subject: Hack Proofing ColdFusion Hi folks, Does anybody knows where I can find the e-book version of "Hack Proofing ColdFusion" (Greg Meyer, Steven Casco, Sarge, Rob Rusher)? I know that I can find it at Amazon.com but I really avoid shopping there (personal problems in the past)... I'm looking for other places but I only found paper edition, not the eletronic one. Thanks!! Alex __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. 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
RE: Onkeypress
I think I need to set the focud of the select list to focus on load... I set the focus but it does not highlight the box? Is there a way to make it highlight an item on the select box onload??? -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 01, 2002 10:31 AM To: CF-Talk Subject: RE: Onkeypress would changing window.event && window.event.keyCode == 13 to window.event == 13 && window.event.keyCode == 13 help at all? Ade -Original Message- From: Kris Pilles [mailto:[EMAIL PROTECTED]] Sent: 01 August 2002 15:28 To: CF-Talk Subject: Onkeypress function entsub() { if (window.event && window.event.keyCode == 13) returninfo(); else return true; } I am using this on a form to allow pressing the enter key to call my function returninfo() However, if the user hits enter and nothing is selected in my select box, I get an error... Any ideas on how I can correct this??? -Original Message- From: Alex Hubner [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 01, 2002 9:25 AM To: CF-Talk Subject: Hack Proofing ColdFusion Hi folks, Does anybody knows where I can find the e-book version of "Hack Proofing ColdFusion" (Greg Meyer, Steven Casco, Sarge, Rob Rusher)? I know that I can find it at Amazon.com but I really avoid shopping there (personal problems in the past)... I'm looking for other places but I only found paper edition, not the eletronic one. Thanks!! Alex __ 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 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
Re: Onkeypress
oi Kris!! what bout using the onKeyUp event? -- Critz Macromedia Certified Advanced ColdFusion Developer Thursday, August 1, 2002, 10:28:21 AM, you wrote: KP> function entsub() { KP> if (window.event && window.event.keyCode == 13) KP> returninfo(); KP> else KP> return true; KP> } KP> I am using this on a form to allow pressing the enter key to call my KP> function returninfo() KP> However, if the user hits enter and nothing is selected in my select KP> box, I get an error... Any ideas on how I can correct this??? KP> -Original Message- KP> From: Alex Hubner [mailto:[EMAIL PROTECTED]] KP> Sent: Thursday, August 01, 2002 9:25 AM KP> To: CF-Talk KP> Subject: Hack Proofing ColdFusion KP> Hi folks, KP> Does anybody knows where I can find the e-book version of "Hack Proofing KP> ColdFusion" (Greg Meyer, Steven Casco, Sarge, Rob Rusher)? I know that I KP> can find it at Amazon.com but I really avoid shopping there (personal KP> problems in the past)... I'm looking for other places but I only found KP> paper edition, not the eletronic one. KP> Thanks!! KP> Alex KP> __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. 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
RE: Onkeypress
would changing window.event && window.event.keyCode == 13 to window.event == 13 && window.event.keyCode == 13 help at all? Ade -Original Message- From: Kris Pilles [mailto:[EMAIL PROTECTED]] Sent: 01 August 2002 15:28 To: CF-Talk Subject: Onkeypress function entsub() { if (window.event && window.event.keyCode == 13) returninfo(); else return true; } I am using this on a form to allow pressing the enter key to call my function returninfo() However, if the user hits enter and nothing is selected in my select box, I get an error... Any ideas on how I can correct this??? -Original Message- From: Alex Hubner [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 01, 2002 9:25 AM To: CF-Talk Subject: Hack Proofing ColdFusion Hi folks, Does anybody knows where I can find the e-book version of "Hack Proofing ColdFusion" (Greg Meyer, Steven Casco, Sarge, Rob Rusher)? I know that I can find it at Amazon.com but I really avoid shopping there (personal problems in the past)... I'm looking for other places but I only found paper edition, not the eletronic one. Thanks!! Alex __ 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 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
Onkeypress
function entsub() { if (window.event && window.event.keyCode == 13) returninfo(); else return true; } I am using this on a form to allow pressing the enter key to call my function returninfo() However, if the user hits enter and nothing is selected in my select box, I get an error... Any ideas on how I can correct this??? -Original Message- From: Alex Hubner [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 01, 2002 9:25 AM To: CF-Talk Subject: Hack Proofing ColdFusion Hi folks, Does anybody knows where I can find the e-book version of "Hack Proofing ColdFusion" (Greg Meyer, Steven Casco, Sarge, Rob Rusher)? I know that I can find it at Amazon.com but I really avoid shopping there (personal problems in the past)... I'm looking for other places but I only found paper edition, not the eletronic one. Thanks!! Alex __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. 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