Re: how to handle forms with more than submit button

2007-08-02 Thread Kenneth Gonsalves
On 03-Aug-07, at 10:12 AM, Kenneth Gonsalves wrote: > > > On 03-Aug-07, at 8:06 AM, james_027 wrote: > >>> create different URLs (and thus different views) for the different >>> buttons and then redirect to wherever you want to go. >>> >> >> How do I create a different URL for different buttons

Re: how to handle forms with more than submit button

2007-08-02 Thread Kenneth Gonsalves
On 03-Aug-07, at 8:06 AM, james_027 wrote: >> create different URLs (and thus different views) for the different >> buttons and then redirect to wherever you want to go. >> > > How do I create a different URL for different buttons but under one > form? each submit button has a name - say

Re: how to handle forms with more than submit button

2007-08-02 Thread Doug B
context_dict.update(button1_helper()) Opps, forgot to actually call button1_helper. Sorry, need sleep :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: how to handle forms with more than submit button

2007-08-02 Thread Doug B
> thanks doug, this is what I did, but I am not comfortable with it. > those two button do different things, and if they're under one method > on the views it could be ugly, what if I have 4 or 5 submit buttons? Keep in mind there is nothing keeping one view from calling another. def

Re: how to handle forms with more than submit button

2007-08-02 Thread [EMAIL PROTECTED]
Well... that's how I've been doing it anyway :) On Aug 2, 11:15 pm, james_027 <[EMAIL PROTECTED]> wrote: > hi, > > On Aug 3, 11:12 am, "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > > Oh... forgot the semicolons after .submit(); but you get the picture > > thanks carole, yes I the picture.

Re: how to handle forms with more than submit button

2007-08-02 Thread james_027
Hi, On Aug 3, 11:21 am, Doug B <[EMAIL PROTECTED]> wrote: > As far as I know a form submits to a single url via the action=? > specifier. That's just the way an html form works. Each submit > button that is part of the form is going to post to the action url in > the form. You can override

Re: how to handle forms with more than submit button

2007-08-02 Thread Doug B
As far as I know a form submits to a single url via the action=? specifier. That's just the way an html form works. Each submit button that is part of the form is going to post to the action url in the form. You can override with javascript, but that doesn't make much sense unless you're doing

Re: how to handle forms with more than submit button

2007-08-02 Thread james_027
hi, On Aug 3, 11:12 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Oh... forgot the semicolons after .submit(); but you get the picture > thanks carole, yes I the picture. so its about javascript not django ... cheers, james --~--~-~--~~~---~--~~ You

Re: how to handle forms with more than submit button

2007-08-02 Thread [EMAIL PROTECTED]
Oh... forgot the semicolons after .submit(); but you get the picture On Aug 2, 11:11 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Something like this... > > > function submitFunctionA() > { >document.getElementById('myform').action = "someurl"; >

Re: how to handle forms with more than submit button

2007-08-02 Thread [EMAIL PROTECTED]
Something like this... function submitFunctionA() { document.getElementById('myform').action = "someurl"; document.getElementById('myform').submit() } function submitFunctionB() { document.getElementById('myform').action = "someotherurl"; document.getElementById('myform').submit()

Re: how to handle forms with more than submit button

2007-08-02 Thread james_027
hi > create different URLs (and thus different views) for the different > buttons and then redirect to wherever you want to go. > How do I create a different URL for different buttons but under one form? Thanks james --~--~-~--~~~---~--~~ You received this

Re: how to handle forms with more than submit button

2007-08-02 Thread Lucky B
create different URLs (and thus different views) for the different buttons and then redirect to wherever you want to go. On Aug 2, 10:13 pm, james_027 <[EMAIL PROTECTED]> wrote: > Hi, > > How do I handle this situation wherein I want different submit button > to call different method on the

how to handle forms with more than submit button

2007-08-02 Thread james_027
Hi, How do I handle this situation wherein I want different submit button to call different method on the views. I feel that calling the same method on views for all the submit button on a form is not good, as you'll make the distinction of what to do inside the method... Thanks james