This works _almost_ :)

I like this suggestion it works very well, but now i have the problem that I
have two functions being called by two different links, so I have:

<input type="hidden" name="eventSubmit_doExpand" value="1">
<input type="hidden" name="eventSubmit_doAdd" value="1">

and now what happens is that depending on which link I hit, either the
Expand or the Add, the backend function called will always be the same.  So
in other words, if a vist my page, hit "add", it calls the add function in
my backend.  But then if I hit the "expand" link, it also calls the add
function in my backend.  Any suggestions as to how to, for lack of a better
word, "clear" the page so that this behavior is not observed?

thank you!

Luke


----- Original Message -----
From: "Jeffery Painter" <[EMAIL PROTECTED]>
To: "Turbine Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, August 20, 2003 5:25 PM
Subject: Re: AW: $link.setAction


>
> You could set the function you want called in your action class in a
> hidden field.
>
> <form
> name="someform"
> method="post"
> action="$link.setAction("myclass").setPage("results.vm")">
>
> <input type="hidden" name="eventSubmit_doAdd" value="1">
> <input type="hidden" name="otherData" value="1">
>
> <a href="javascript:doSubmit()">Add</a>
>
> </form>
>
> It works just as well as using a form submit element.
>
> You should only pass data and context through the doAdd function, use
> data.getParameters() to pull the otherData variable... these variables
> will not be passed directly to
>
> doAdd(Rundata data, Context context)
>
> good luck,
> Jeff Painter
>
> On Wed, 20 Aug 2003, Luke Majewski wrote:
>
> > Right, but the problem here is how do I specify what function I want
called
> > in "myClass" doing it this way.  I don't want a button, I want a link,
and
> > when I use a link and use the onClick (and submit the form through
> > javascript) it didn't work either.  I'll try a couple other variations
and
> > get back to everyone about this.
> >
> > Thank you for everyone's help!
> >
> > Luke Majewski
> >
> >
>
>
> ---------------------------------------------------------------------
> 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]

Reply via email to