On 6/12/07, Andrew Scott wrote: > > if it was me I would remove the form. > > Put the event onKeyUp="javascript:entermessage()" and then in the > entermessage check that the key up was indeed return (enter = 13). > > Then you remove the need for the unwanted form tags.
I've got a habit, I think I picked it up from Netscape, of putting form fields in form tags, because IIRC, it wouldn't render the form field if it wasn't in one. Probably something long past being needed, but with the DOM being what it is, it's sometimes nice to have a wrapper for form type stuff. Also, if you do it right, you can have you your code gracefully degrade, when someone isn't using javascript. (probably not an issue in an app that relies on AJAX ;-}). I've got a 1 page example of some dojo JS that wraps a "normal" site in dojo-gooey-ness (Including forms and img/img areas!). I will share it for a million dollars in small unmarked bills. Or if asked. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create robust enterprise, web RIAs. Upgrade & integrate Adobe Coldfusion MX7 with Flex 2 http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:280896 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4