>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!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Check out the new features and enhancements in the
latest product release - download the "What's New PDF" now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292966
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4