----- Original Message ----- From: "jawad haider" <jawadh@hotmail.com> To: <andreas@digicool.com> Cc: <zope-dev@zope.org> Sent: Wednesday, May 23, 2001 7:44 PM Subject: Re: [Zope-dev] Simple Question
</table> <input type="submit"value="Search Customer"> </form>
Here dtFindCustomer is a DTML method which in turn call z sql method which performs actual search in the MY SQL DB. The control is transfered to the next page when the form action method is called.
HOW CAN i redirect the control on the same page and get the results returned to the same page and displayed on this same page ?
Hope I am able to explain my question this time.
Try to add a name attribute to the submit button like: <input type="submit" name="submitted" value="Search Customer"> Inside the DTML method you must check if the 'submitted' variable is set: <dtml-if submitted> Form has been submitted ..... <dtml-else> <form action=....> </form> </dtml-if> Andreas
On Wed, 23 May 2001, jawad haider wrote:
I wanted to make a search form in which search criteria and search result will appear on the same page e.g.search criteria on the top and when the submit button is pressed the list of search results should be displayed in the bottom of the page.
But when I try to accomplish this using the following code the search results are displayed on a separate page.
You want to page to 1) draw a form if there are no search criteria and 2) call itself when the form is submitted. Andreas already showed how you can check for a form submission, and havving the page call itself is simple: <form action="."> this form will submit to its own URL. Your question is out of the scope of this list, which is about Zope core and product development. This is a user question, and should be directed to the Zope list zope@zope.org. -Michel
participants (3)
-
Andreas Jung -
jawad haider -
Michel Pelletier