ASP Help

Sharky Forums


Results 1 to 2 of 2

Thread: ASP Help

  1. #1
    Catfish
    Join Date
    Nov 2000
    Location
    Santa Barbara
    Posts
    146

    ASP Help

    Hey guys I just started learning ASP. It seems really easy and powerful. Just messing around with it right now and want to know if it is possible to make an IF then statement popup a form. Right now I have a form that just states your name then goes to this ASP script.
    <%
    Dim v
    v = Request.Form("myentry")
    If v = "Shawn" then
    Response.write ("Hello" & Request.form("Myentry") & "!")
    else
    Response.Write ("Hello Your Name isn't Shawn it is " & Request.form("myentry") & "!")
    Response.Write ("<br>How are you today?")
    End If
    %>

    I tried making it so that if your name was = "Shawn that it would pop up another form asking for your last name but it didn't like that too much. Is that even possible it seems to me that it should be possible.

    Thanks
    Shawn
    Samsung SyncMaster 900NF 19" flat CRT
    Windows XP Professional
    Epox EP-8k3a+
    Athlon XP 1600+ @ 10.5x166+1=743 AKA 2100+ AGOIA
    Glaciator II
    256MB PC2700@166 Samsung DLT(Newegg said CLT bastards) CAS2.5 Fastest settings
    Visiontek Geforce3 @ 220/500
    Realtec Nic
    SB Live! MP3+ 5.1
    Pioneer 10/40x DVD
    LiteOn 24/10/40 CD-RW
    Generic Floppy
    Maxtor DiamondMax 60 30.0GB 7200 ATA100
    Maxtor DiamondMax 60 20.0GB 7200 ATA100

  2. #2
    Catfish
    Join Date
    Sep 2001
    Location
    Ft Myers FL
    Posts
    236
    Something simple like this?
    <%
    varName = Request("myentry")
    If varName = "Shawn" then
    Response.write ("Hello" & varName & "!")
    else
    %>
    Hello Your Name isn't Shawn it is <%=varName%>!
    <br>How are you today?
    <br>Please Enter your Last Name?
    <FORM action="thispage.asp" method="POST">
    <input type="text" name="lastname">
    </form>
    <%
    End If
    %>
    Last edited by FMRock; 09-08-2002 at 10:59 PM.
    MSI K7T266 Pro2,AMD XP1600,Volcano 6CU+
    Crucial 512 MB PC2100,Min Maw Case
    WD 100 Gig HD,GF2
    -------------------------------------
    Dell Inspiron 8200. P4 1.7 384mb, 30 gig HD, ATI Radeon 9000

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •