desiwave wrote: > ... > Event.observe(ticketBarcode, "change", > formSubmit.bindAsEventListener(ticketBarcode)); > ----will submit the form after value change. > > As you can see in the code I am listening "change" event on the text > fields. So after scanning, the field values will change (and i am > using this change event to trigger formSubmit). the "listenForScan" > and "formSubmit" should get triggered simultaneously without any user > input. It works on firefox but not on IE6. > ... So the onchange isn't firing properly in IE6. I seem to have had it in my mind that IE6 only supported onchange for selects, but a google search of "onchange IE6" seems to indicate otherwise. I know I've had trouble with onchange for inputs on IE6 and I just avoid them.
What happens when you attach the function to the ticketBarcode element inline? My BarcodeListener widget takes another approach altogether. It listens for keypresses, then waits for a break of at least 250ms (I discovered that USB barcode readers typically fire the keypress event about 20ms apart for each character). After any such break, it checks all the registered regexes and executes the corresponding registered functions for matches. That way, it doesn't need to use inputs to capture the barcode string. -- Ken --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
