Hi Tony
Thats exactly what I wanted. I didn't see your post and I'd worked it
out. What i was missing was the way flow script works. I needed to get
the submit id after the initial form processing.
Thanks
Mark
On Wed, 16 Feb 2005 08:46:51 +1100, Tony Edwards <[EMAIL PROTECTED]> wrote:
>
>
> Hi Mark,
> Is this similar to what you're after?
> //If user selects 'newUser', display new user form
> if ("newUser".equals (userForm.submitId)) {
> print("New User selected!");
> newUser();
> return;
> } else if ("userSearch".equals (userForm.submitId)){
> print("searching for an existing user");
> searchUser();
> return;
> } else {
> var userNar = model.narNums;
> print("Edit existing user with nar of " + userNar);
> editUser(userNar);
> }
> I've got a form with 3 buttons with ids of newUser, userSearch and
> userSelect.
> Depending on which button gets clicked determines what function gets
> called next.
>
> If I'm completely off the mark, my apologies!!!!
>
> Regards,
> Tony
>
> Mark Lowe wrote:
>
>
> > > I see you're getting into the true cocoon spirit!
> >
> > Perhaps reluctantly yes..
> >
> > I solved that problem, I'm still trying to distingish between whats up
> > with cocoon and the code these crack addicts wrote..
> >
> > The nature of my problem is that I didn't reflect on how flowscript
> > works with showForm() the submitId wont appear until the submission
> > gets passed that bit of the code. I was errornously thinking that
> > submitId was just a wrapper around the request parameters, but when i
> > viewed the source there was no way that could have been the case.
> >
> > I haven't found a way of mapping buttons to functions so I could have
> > a crud.js with save,delete and so on run on different button presses
> > (at least without client-side javascript which I don't like doing).
> >
> > Thanks for the replies
> >
> > Mark
> >
> >
> > On Tue, 15 Feb 2005 15:38:30 +0100, Jorg Heymans <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > > Mark Lowe wrote:
> > > > Guess its more trial and error looking at the source code and the
> > > > fragments that are commonly refered to as documents..
> > >
> > > I see you're getting into the true cocoon spirit!
> > >
> > > ;)
> > > Jorg
> > >
> > > ---------------------------------------------------------------------
> > > 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]
> >
>
>
>
> ---------------------------------------------------------------------
> This email is from Civica Pty Limited and it, together with any attachments,
> is confidential to the intended recipient(s) and the contents may be legally
> privileged or contain proprietary and private information. It is intended
> solely for the person to whom it is addressed. If you are not an intended
> recipient, you may not review, copy or distribute this email. If received in
> error, please notify the sender and delete the message from your system
> immediately.
>
> Any views or opinions expressed in this email and any files transmitted with
> it are those of the author only and may not necessarily reflect the views of
> Civica and do not create any legally binding rights or obligations
> whatsoever. Unless otherwise pre-agreed by exchange of hard copy documents
> signed by duly authorised representatives, contracts may not be concluded on
> behalf of Civica by email.
>
> Please note that neither Civica nor the sender accepts any responsibility
> for any viruses and it is your responsibility to scan the email and the
> attachments (if any). All email received and sent by Civica may be monitored
> to protect the business interests of Civica.
>
> ---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]