whats wrong in this code..help - Programmers Heaven

Howdy, Stranger!

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

Categories

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.