I have a form that I'm using with AJAX calls to the DB.

I'd like to use Enter to call the AJAX function. However, the form is 
trying to submit itself when I press enter.

Is there a way of disableing enter from submitting a form on a page? Or 
is there a workaround that someone can think of? I've tried redirecting 
the form back to the form itself, but the problem becomes that I have a 
onkeydown already defined and that seems to be taking presidence on the 
calls. So it goes to the keydown and doesn't go to enter..

Any ideas?

<body onload="showmessages()">
<cfoutput>
        <form action="#self#Chat.Default" method="Post">
                Message:
                <input type="text" id="Message" onenter="entermessage()" 
onkeydown="showmessages()" size="40">
                <input type="Hidden" id="Room" value="1">
        </form>
</cfoutput>
<HR>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Macromedia ColdFusion MX7
Upgrade to MX7 & experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion?sdid=RVJW

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:280717
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to