response

V

Vinaya

Hi
In my html page to update a table I am forwarding request to a ASP apge bys
using form.action="test.asp", and form.submit(). In asp I am doing database
update. Response of this I want to show alert box to user whether operation
is succesful. I donot want ot redirect to some other page and I do not want
to disturn existing view. I mean I want get only response such as true or
false and based on respose I will display alert in front end.
I want some thing like this,

form.action="test.asp";
var result=form.submit()
if( result="successfull")
alert("Succesful")
else
alert("failed")

I am new to ASP.
 
E

Evertjan.

=?Utf-8?B?VmluYXlh?= wrote on 14 jan 2005 in
microsoft.public.inetserver.asp.general:
Hi
In my html page to update a table I am forwarding request to a ASP
apge bys using form.action="test.asp", and form.submit(). In asp I am
doing database update. Response of this I want to show alert box to
user whether operation is succesful. I donot want ot redirect to some
other page and I do not want to disturn existing view. I mean I want
get only response such as true or false and based on respose I will
display alert in front end. I want some thing like this,

form.action="test.asp";
var result=form.submit()
if( result="successfull")
alert("Succesful")
else
alert("failed")

I am new to ASP.

I guessed so.

The above is all clientside coding,
and form.action is not a function that returns a value.

ASP runs on the server so only gets the input values
from the submitted form and can process that
and can return a new page conditional on those values to the client.


page1.asp:

<form method='post' action='page2.asp'>
<input type='text' name='myValue' value=''>
</form>

page2.asp

<% 'serverside ASP VBscript

v = request.form("myValue")

t = "You form-posted " & v & " to the server<br>"

response.write t

%>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top