Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Nov 2006
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Function Help - Newbie needs help

    Beginner - Using Classic ASP - Dreamweaver - SQL 2008 - I have a Web page where I create a Session that houses an ID based on the user's input. The ID can either start with a W or not. I pass the Session to an SQL query which brings back data used in a Web form that has some fields on the form auto-populated. I want to be able to have a function that would, based on the Session ID, go to formA if the Session starts with W or goes to formB if it does not start with a W. Any help is greatly appreciated.

  • #2
    Regular Coder
    Join Date
    Apr 2012
    Location
    St. Louis, MO
    Posts
    985
    Thanks
    7
    Thanked 101 Times in 101 Posts
    You wouldn't use JavaScript for that; that would be server-side (Classic ASP) conditional.

    Correction: You _shouldn't_ use JavaScript for that. Better done in Classic ASP.
    ^_^

    If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
    *
    The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".

  • #3
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,487
    Thanks
    23
    Thanked 636 Times in 635 Posts
    We are not here to code on demand. We help you if you have trouble with your code. If you have coded this please post and we'll see if we can find the problem.

    This is a simple function to code. Simply call the session id variable and do an if /else on it. That's all.

  • #4
    New Coder
    Join Date
    Nov 2006
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks to all - yes it is simple for those that know - This is what worked for me

    <%

    If (LEFT(Session("WITEM"),1) <> "W") Then
    Response.Redirect("GTSO_Entry_form.asp")
    Else
    Response.Redirect("Triage.asp")
    End If
    %>

    I appreciate the help and not coding it for me.


  •  

    Posting Permissions

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