I'm following the Action-Event model from the HowTo and it works
rather nicely -- very clean. However, I've found one instance where
it seems to be a bit fragile.
If I create a simple form with only one text input field and a SUBMIT
button, Netscape automatically acts like I hit SUBMIT if I type my
text and just hit RETURN in the INPUT box. The Action-Event
processing does *not* appear to get a valid button name from the form
submission so falls through to the catch-all doPerform (per the HowTo).
Here's my form:
<FORM ACTION="$link.setPage("IntranetBroker.vm").setAction("IntranetBroker")"
METHOD="POST">
<b>Go to URL:</b>
<br>
<INPUT NAME="url" TYPE="TEXT">
<br>
<INPUT NAME="eventSubmit_doGeturl" VALUE="Get URL" TYPE="SUBMIT" >
</FORM>
My method IntranetBroker.doGeturl() is invoked properly if the user
types in and then clicks the "Get URL" SUBMIT button, but the code
falls through to the doPerform() catch-all if they type text and hit
RETURN, sending the form in without hitting the SUBMIT.
Is there a way to fix this? (I expect a form could have multiple
buttons, possibly multiple type=SUBMIT ones; could Action-Events be
made to use one as a default for the method selection?)
Is there a way to see what non-button is getting to my class?
Thanks.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>