[thelist] ASP - actions taken before redirect? (again)

darren darren at web-bitch.co.uk
Thu Sep 27 18:20:01 CDT 2001


On 28 September 2001 at 00:08:12, spinhead <evolt at spinhead.com> wrote:

s> Happening in one page, how? Here's what's going on - manager comes to this
s> page to approve a request, enters there authentication info, and submits the
s> form. If the auth info is wrong, they're redirected to approval page 2 (the
s> 'try again' page)

how about....

comes along to page which displays the request.  manager enters their
details and hits submit which submits the form back to the same page,
which checks to see if the submit button has been pressed and validates
the details.  if the details are good you can send them off to whereever,
else you display the try again message with the old comment.  so you
would have something like...

   <%
   if len(Request.Form("btnSubmit")) > 0 then
      validate info

      if goodinfo then
         redirect to isgood.asp
      else
         response.Write "try again"
      end if
   end if

   'get comments here

   %>
   
   <form action="page1.asp" method="post">
      <textarea name="comments"><%=strComments%></textarea>
      <input type="submit" name="btnSubmit" value="Submit" />
   </form>

so the first time to the page you would just have the comment.  after
submitting the page you would have the message or be redirected to the
next relevant page or whatever you need to do next.

hopefully that's something approximating clear, my brain is beginning to
really dislike me!! ;>

darren





More information about the thelist mailing list