|
 |
access_asp thread: form submittal problem
Message #1 by Chika Ukabam <chikaukabam@y...> on Mon, 19 Aug 2002 13:29:02 -0700 (PDT)
|
|
I have a form in an asp page with two buttons that need the form to be submitted.
One button retrieves data from an access database and populates several fields on the page. The other button is used to update any
changes made to the data.
How do I handle this?
I tried creating two seperate forms in a two frame page, but each time I submitted one form the interface of that frame would be
replace with the interface of the form being submitted to.
Help!
---------------------------------
Do You Yahoo!?
HotJobs, a Yahoo! service - Search Thousands of New Jobs
Message #2 by "Zee Computer Consulting" <zee@t...> on Mon, 19 Aug 2002 14:10:40 -0700
|
|
Assign same name, different value to two input buttons:
Response.Write( "<form action='db.asp' method='post'>" )
Response.Write( "<input type='submit' name='choice1'
value='Retrieve'>" )
Response.Write( "<input type='submit' name='choice1' value='Update'>" )
Response.Write( "</form>" )
and the form calls the next page for both buttons.
On the called page you can test for the value:
choice1 = ucase( Response.Form( "choice1" ) )
IF choice1 = "UPDATE" THEN
' Update Code here
ELSE
' Retrieve code here
END IF
and process either action on the same page.
-- Zee
----- Original Message -----
From: "Chika Ukabam" <chikaukabam@y...>
To: "Access ASP" <access_asp@p...>
Sent: Monday, August 19, 2002 1:29 PM
Subject: [access_asp] form submittal problem
>
> I have a form in an asp page with two buttons that need the form to be
submitted.
> One button retrieves data from an access database and populates several
fields on the page. The other button is used to update any changes made to
the data.
>
> How do I handle this?
> I tried creating two seperate forms in a two frame page, but each time I
submitted one form the interface of that frame would be replace with the
interface of the form being submitted to.
>
> Help!
|
|
 |