Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

whats wrong in this code..help

iam trying a self submitting form,, everything is working.. i just need to write on the document what the error is.. e.g, if login is incorrect, it should write "incorrect" after the text box in red.. this is just a test page..
<%@ Language="VBSCRIPT" %>


Sample






dim err
err=false

If ucase(trim(request.ServerVariables("REQUEST_METHOD")))="POST" Then
if ( Request.form("login") = "asfia") then
Response.Redirect("hello.asp")
else
err = true
Response.Write(err)
End if
End if

APT System

">











Login ">
Password
hello
<%Response.Write(err)%> THE PAGE DOESNT DISPLAY ERR STATE HERE..WHY?



Comments

  • CyGuyCyGuy Posts: 312Member
    Probably want to look into using forms alittle more... here is how it is done: http://www.devguru.com/technologies/html/6262.asp
    Although the language is client side, the call should be made to check for error just before it is submitted!


    : iam trying a self submitting form,, everything is working.. i just
    : need to write on the document what the error is.. e.g, if login is
    : incorrect, it should write "incorrect" after the text box in red..
    : this is just a test page..
    : <%@ Language="VBSCRIPT" %>
    :
    :
    : Sample
    :
    :
    :
    :
    :
    : [color=Red]This actually in the page?? if so are you going to name the Subroutine?[/color]
    : dim err
    : err=false
    :
    : If ucase(trim(request.ServerVariables("REQUEST_METHOD")))="POST" Then
    : if ( Request.form("login") = "asfia") then
    : Response.Redirect("hello.asp")
    : else
    : err = true
    : Response.Write(err)
    : End if
    : End if
    :
    :
    :
    :

    APT System
    :

    : ">[color=Red]Here is where you will check the input with some call using the =onsubmit method[/color]
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    Login ">
    :
    Password
    :
    :
    : hello
    : <%Response.Write(err)%> THE PAGE DOESNT DISPLAY ERR STATE HERE..WHY?[color=Red]Not of text datatype[/color]
    :
    :
    :
    :
Sign In or Register to comment.