List Info

Thread: Which button was clicked?




Which button was clicked?
user name
2007-03-31 03:32:15
When there are multiple submit buttons, how do you extract
the clicked
one from the request.POST?

Thanks,

Mark

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Which button was clicked?
country flaguser name
Australia
2007-03-31 03:41:42
On Sat, 2007-03-31 at 01:32 -0700, Mark Engelberg wrote:
> When there are multiple submit buttons, how do you
extract the clicked
> one from the request.POST?

Each button in the form can have a different name. Only the
button that
was selected to cause the form submission to happen will be
included in
the result set submitted back to the server. So you can look
for your
button names and act on whichever one is present.

Regards,
Malcolm




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Which button was clicked?
country flaguser name
United States
2007-03-31 08:01:46

On 31-Mar-07, at 2:02 PM, Mark Engelberg wrote:

> When there are multiple submit buttons, how do you
extract the clicked
> one from the request.POST?

'buttonname' - same as standard cgi

-- 

regards
kg
http://lawgon.livejourn
al.com
http://nrcfosshelpline
.in/web/



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )