reload page after form submission
hi, I have DTML Method (0index_html) that contains a html form - the 'action' for this form is another DTML Method : i.e <form action="added_announcement_html" method="post"> added_announcement_html contains a 'call' statement to INSERT the data into a MySQL database, i.e : <!--#call add_announcement_sql--> <!--#call "RESPONSE.redirect('0index_html')"--> ,and contains a call statement to reload the original page with the newly added data. My question is this : is there a more way to submit the form and reload the page without making a second method (in my case added_announcement_html) to make the calls to the SQL and Redirect statements ? My folders are rapidly filling up with these sorts of methods and I would prefer to cut down on redundant methods if I can. thanks in advance, Darcy
My question is this : is there a more way to submit the form and reload the page without making a second method (in my case added_announcement_html) to make the calls to the SQL and Redirect statements ? My folders are rapidly filling up with these sorts of methods and I would prefer to cut down on redundant methods if I can.
It can all be done with one document. <dtml-var standard_html_header> <dtml-if mysubmitbutton> Code to insert stuff into the database </dtml-if> <form method="post"> My form. Note the default action in HTML is the current document <input type=submit name=mysubmitbutton value=" Add "> </form> <dtml-var standard_html_footer> -- ___ // Zen (alias Stuart Bishop) Work: zen@cs.rmit.edu.au // E N Senior Systems Alchemist Play: zen@shangri-la.dropbear.id.au //__ Computer Science, RMIT WWW: http://www.cs.rmit.edu.au/~zen
participants (2)
-
Darcy Clark -
Stuart 'Zen' Bishop