Web Connection
script question
Gravatar is a globally recognized avatar based on your email address. script question
  Stein Goering
  All
  Aug 25, 2015 @ 09:44pm
I've got a .wcs script page with a form that calls one of my application pages:
<form id="form1" action="formtest.awp" method="POST">

But I want to use VFP code to process some of the form vars when submitting the form. So I tried blanking the action attribute so the form would post back to itself and added this code:
<% IF Request.IsPostBack()
*...process vars here
Response.redirect('formtest.awp')

But of course now I've lost all my form var values. Is there a way to do this and still preserve the values to be posted?

--stein

Gravatar is a globally recognized avatar based on your email address. Re: script question
  Rick Strahl
  Stein Goering
  Aug 26, 2015 @ 12:03am
Not quite sure I understand what you're trying to do.

A redirect will lose all form data so your only option is to let the page complete and thus repost the form vars.

+++ Rick ---



I've got a .wcs script page with a form that calls one of my application pages:
<form id="form1" action="formtest.awp" method="POST">

But I want to use VFP code to process some of the form vars when submitting the form. So I tried blanking the action attribute so the form would post back to itself and added this code:
<% IF Request.IsPostBack()
*...process vars here
Response.redirect('formtest.awp')

But of course now I've lost all my form var values. Is there a way to do this and still preserve the values to be posted?

--stein


© 1996-2024