mbt masai
 
Welcome !
         

                                
After experiencing a lot of down time, We decided to move this site to CrystalTech.com. CrystalTech.com is powered by only the finest Windows servers providing the best performance, reliability, and value anywhere.

 Keep the form field filled.

Author Message
hanqianliong

  • Total Posts : 2
  • Scores: 0
  • Reward points : 0
  • Joined: 12/8/2009
  • Status: offline
Keep the form field filled. Tuesday, December 08, 2009 3:29 AM (permalink)
0
Hello friends, maybe you will confuse about the subject that i wrote, i have problem with form validation, i've made validation for every fields, but everytime one of the field was invalid, the previous field that already filled was became blank. So how can i pretend to make the fields (except password field) that already filled can not blank when there was a invalid fill.

Here is the script that i made :

    if sName = "" then
        Response.Redirect("registration.asp?err=Please fill the name")
    end if
   
    if sPassword = "" then
        Response.Redirect("registration.asp?err=please fill the password")
    end if
   
    if sPassword <> sConfirm then
        Response.Redirect("registration.asp?err=password is not same")
    end if
   
    if sGender = "" then
        Response.Redirect("registration.asp?err=please choose gender")
    end if
   
    if dtDate = "" then
        Response.Redirect("registration.asp?err=Please fill birth of date")
    end if
   
    if not isDate(dtDate) then
        Response.Redirect("registration.asp?err=Invalid Birth Of Date")
    end if
   
    if iLen = 0 then
        bFieldIsOkay = false
        Response.Redirect("registration.asp?err=Please fill email address")
    elseif iLen < 7 then
        bFieldIsOkay = false
        Response.Redirect("registration.asp?err=Email address should be more than 7 characters")
        else
            for t = 1 to iLen       
                if instr(searchchar, LCase(mid(sEmail, t, 1))) <> 0 then  
                    counter = counter + 1
                end if
            next
            if counter <> 1 then
                bFieldIsOkay = false
                Response.Redirect("registration.asp?err=Invalid Email Address")
            else
                for iCtr = 1 to mypos - 1    
                        sChar = mid(sEmail, iCtr, 1)         
                        if not instr(sValid, sChar) <> 0 then   
                            bFieldIsOkay = false
                            response.redirect("registration.asp?err=Invalid Email Address")
                        end if
                next
            end if
               
                       
            for iCtr2 = mypos + 1 to mypos2                
                sChar = mid(sEmail, iCtr2, 1)  
                if not instr(sValid, sChar) <> 0 then   
                            bFieldIsOkay = false
                            response.redirect("registration.asp?err=Invalid Email Address")
                end if
            next
   
    end if
   
#1

    Online Bookmarks Sharing: Share/Bookmark

    Jump to:

    Current active users

    There are 0 members and 1 guests.

    Icon Legend and Permission

    • New Messages
    • No New Messages
    • Hot Topic w/ New Messages
    • Hot Topic w/o New Messages
    • Locked w/ New Messages
    • Locked w/o New Messages
    • Read Message
    • Post New Thread
    • Reply to message
    • Post New Poll
    • Submit Vote
    • Post reward post
    • Delete my own posts
    • Delete my own threads
    • Rate post

    2000-2012 ASPPlayground.NET Forum Version 3.8
    mbt shoes www.wileywilson.com