[mod_python] R: Mod_python Digest, Vol 18, Issue 27 : How to have a form submit to two different servlet

Manera, Villiam vmanera at manord.com
Fri Sep 17 20:07:46 EDT 2004


I use this trick for solve the problem below:
<input type=submit name="_call_do_some_function()" >

def do_some_function(self):
	......
	self.external_redirect(uri)
	return True 

Villiam Manera


#---------------------------------------------------------
Message: 12
Date: Fri, 17 Sep 2004 08:08:30 -0700 (PDT)
From: Vinj Vinj <vinjvinj at yahoo.com>
Subject: [mod_python] How to have a form submit to two different
	servlets	with _call_
To: mod_python at modpython.org
Message-ID: <20040917150831.5720.qmail at web41310.mail.yahoo.com>
Content-Type: text/plain; charset=us-ascii

I'm using the _call functionality significantly.
Depending on the button the user preses, I need to
submit the form to two different servlets.

I'm ujsing the onclick functionality of the submit tag
on the form:

<input type=submit 
name="_call_do_some_function()" 
onClick="document.mainform.action='Servlet1';document.mainform.submit();>

But the problem with that is the the right _call_
function is not being passed to the servlet.

so then I tried:

<input type=submit 
name="_call_do_some_function()" 
onClick="document.mainform.action='Servlet1?=_call_do_some_function()';document.mainform.submit();>



More information about the Mod_python mailing list