Mark, Unfortunately, I believe that my solution is T2.3 specific. I think patching 2.2 is possible though.
Regards, Peter On Mon, 2003-09-08 at 16:51, Mark Lybarger wrote: > I'm using turbine 2.2. I've quickly tried a few of the suggestions. Here's > my current form: > > <form action="$link.setAction( "CustomerAction" > )?eventSubmit_doSearch=dummy" method="post" name="customer"> > ... > <td style="text-align: center;"><input type="submit" > accesskey="a" value="Add" name="eventSubmit_doAdd"></td> > <td style="text-align: center;"><input type="submit" > accesskey="c" value="Change" name="eventSubmit_doChange"></td> > <td style="text-align: center;"><input type="submit" > accesskey="d" value="Delete" name="eventSubmit_doDelete"></td> > <td style="text-align: center;"><input type="button" > accesskey="r" onclick="scoringReset();" value="Reset" name="reset"></td> > <td style="text-align: center;"><input type="submit" > accesskey="s" value="Search" name="eventSubmit_doSearch"/></td> > <input type="hidden" name="eventSubmit_doSearch" > value="Search"/> > > ... > > </form> > > Adding the imput type="hidden" had no effect. When i press enter using > mozilla, this seems to be executing both the doSearch method (b/c of the > change to the form action link) and the doAdd method (browser implied > submit). Is this a feature that turbine can execute multiple methods > depending on what name/value pairs are set? One thought that came up in our > group was to use a hidden input element (non-displayed image input) before > the Add element that would have the name of the default method (doSearch). > > Thanks for the ideas! > ~mark > > -----Original Message----- > From: Samuel Le Berrigaud [mailto:[EMAIL PROTECTED] > Sent: Monday, September 08, 2003 10:56 AM > To: Turbine Users List > Subject: Re: Action events - default submit button > > > this html input will call the method doUpload of the associated action > file referenced by the form > > <form method=post action=$link.setAction("Upload") > > <input type="submit" name="eventSubmit_doUpload" value="upload" /> > </form> > > becarefull no Uppercase letter is accepted after the first one ... > > Hope it helps... > > SaM > > Peter Courcoux wrote: > > >Mark, > > > >If you are using T2.3 I think you can use a value attribute to the > ><input> tag to indicate which event to action. I have not used this > >feature yet but I believe that the technique is to use javascript to set > >the value attribute of the <input> element corresponding to the button > >which is being clicked. There is a property in TR.props :- > > > >action.eventsubmit.needsvalue = false > > > >which switches this feature on. If true, the code in ActionEvent selects > >the method corresponding to the element with the value attribute set. If > >false, the default, it selects the first eventSubmit_doXXX method it > >finds. > > > >You can, of course, set the value for the default button, and use the > >javascript to change it if another button is clicked. > > > >I think that there are some docs about this somewhere, but it is a > >recent addition to the 2.3 code. > > > >I hope this helps. > > > >Regards, > > > >Peter > > > >On Mon, 2003-09-08 at 12:56, Mark Lybarger wrote: > > > > > >>I have a form with 3 submit buttons. When I press enter on the form, it > >>seems the browser (ie and mozilla) pretends that I've clicked on the first > >>submit button that appears in the html. Unfortunately, this is not the > >>default button that I'd like to have. > >> > >>How can i make a default submit default button other than what the browser > >>considers to be the default (first coded)? > >> > >>Thanks! > >>Mark > >> > >>--- > >>Outgoing mail is certified Virus Free. > >>Checked by AVG anti-virus system (http://www.grisoft.com). > >>Version: 6.0.509 / Virus Database: 306 - Release Date: 8/12/2003 > >> > >> > >> > >>--------------------------------------------------------------------- > >>To unsubscribe, e-mail: [EMAIL PROTECTED] > >>For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.509 / Virus Database: 306 - Release Date: 8/12/2003 > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.509 / Virus Database: 306 - Release Date: 8/12/2003 > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Peter Courcoux <[EMAIL PROTECTED]> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
