response

Discussion in 'ASP General' started by Vinaya, Jan 14, 2005.

  1. Vinaya

    Vinaya Guest

    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.
     
    Vinaya, Jan 14, 2005
    #1
    1. Advertising

  2. Vinaya

    Evertjan. Guest

    =?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

    %>


    --
    Evertjan.
    The Netherlands.
    (Replace all crosses with dots in my emailaddress)
     
    Evertjan., Jan 14, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Charles A. Lackman
    Replies:
    2
    Views:
    8,092
    Charles A. Lackman
    Jan 11, 2006
  2. Matthew Wieder

    Response.Write and Response.Redirect

    Matthew Wieder, Jul 17, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    754
    Kevin Spencer
    Jul 17, 2003
  3. Promenade

    Response.Expires and Response.Cache

    Promenade, Dec 5, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    30,868
    Promenade
    Dec 5, 2003
  4. Sehboo
    Replies:
    3
    Views:
    8,932
    Sehboo
    Dec 10, 2003
  5. Calvin Lai
    Replies:
    6
    Views:
    21,030
    Joerg Jooss
    Dec 31, 2003
Loading...

Share This Page