Or do this:
<form name="echo" id="echo" onsubmit="submit(); return false;" >
~Todd
On Nov 8, 2007 8:32 PM, Todd <[EMAIL PROTECTED]> wrote:
>
> Nick,
>
> It does work, but you have to change your <input type="button"> to <input
> type="submit"> or at least put a submit() function on the button. If the
> form isn't submitting, there's a reason why and that's cause you're not
> triggering it.
>
> ~Todd
>
> On Nov 8, 2007 1:34 PM, Nick Cernis <[EMAIL PROTECTED]> wrote:
>
> > >Add method="post" and use onsubmit="return false;"? Is there a reason
> > why
> > >there's no method?
> >
> > Thanks for the reply and for your thoughts, Todd. Specifying
> > method="post" wouldn't make much difference, I'm afraid - using "return
> > false;" in the submit handler means the form never gets the chance to
> > submit, be it by post or get. This is the desired effect, but makes for a
> > somewhat unfriendly form - users /have/ to submit it by pressing the button
> > and can't just hit enter.
> >
> > I have found a workaround, though - by checking for the enter key on
> > each keypress in the input box, I can call the original echoWord() method if
> > the enter key is pressed, like this:
> >
> > <script language="javascript">
> > function checkEnter(event){
> > if (event.keyCode == 13) {
> > echoWord();
> > }
> > }
> > </script>
> >
> > <form name="echo" id="echo" onsubmit="return false;" >
> > <input type="text" name="word" id="word" onKeyPress="checkEnter(event)">
> > <input type="button" name="done" value="Submit" onclick="echoWord();">
> > </form>
> >
> > It's not ideal, and there's probably a better way - if anyone can
> > suggest a more fool-proof method of using cfajaxproxy with forms your
> > thoughts will be warmly welcomed!
> >
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Enterprise web applications, build robust, secure
scalable apps today - Try it now ColdFusion Today
ColdFusion 8 beta - Build next generation apps
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293003
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4